With the exception of the wireless transceiver, I have my ATmega128RFA1 fully programmed. This transceiver thing is all new to me, and I'm struggling to program it through the datasheet and the code examples I can find online.
So to get started, I want to simply change the state by writing to a register, and then try to detect a state transition to verify I did that part right:
sbi(TRXPR,TRXRST);//reset //a transition has occured if(TRX_STATUS_struct.trx_status == STATE_TRANSITION_IN_PROGRESS) rprintf("\nwireless reset detected");
Unfortunately however that code snippet doesn't actually print anything out. (I'm using USB out another UART to view the data)
What am I doing wrong?
I also tried writing to the sleep register, but no luck:
sbi(TRXPR,SLPTR);//go to sleep
This is what the datasheet says:
If TRX_STATUS = 0x1F (STATE_TRANSITION_IN_PROGRESS) the radio transceiver is on a state transition. Do not try to initiate a further state change while the radio transceiver is in STATE_TRANSITION_IN_PROGRESS.