This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Radio end/disabled event missing

Hello

I am working on a proprietary radio protocol while dealing with a problem that I stuck at for 2 days now. I am managing to get the radio stuck in a TX state (NRF_RADIO->STATE == 11) where the disabled and end event never come. This bug happens at random times. sometimes it takes minutes sometimes a hour. Before the bug the code is running as expected.

My question is what could make the radio stay in the TX state? I can't seem to find any reason in the documentation for this to happen. It would have made much more sens if the radio was stuck in TXidle.

This is the state of the radio when entering the bug:

RadioState: 11 EVENTS_ADDRESS: 0 EVENTS_BCMATCH: 0 EVENTS_DEVMATCH: 0 EVENTS_DEVMISS: 0 EVENTS_DISABLED: 0 EVENTS_END: 0 EVENTS_PAYLOAD: 0 EVENTS_READY: 1 EVENTS_RSSIEND: 0 RADIO SHORTS: 2 RADIO INTEN: 16 NRF_PPI->CHENCLR: 7

  • I seem to have found the problem.

    Before sending this message I was in RX mode. I had a PPI channel enabled to disable the radio on the RTC0 Compair event. When receiving a message I restarted the RX state (NRF_RADIO->TASKS_START = 1). I didn't take in to account that the Radio could be disabled at any time tanks to the PPI. This resulted in me doing a TASKS_START = 1 while the radio was disabled. According to the datasheet triggering a task from the wrong state could result in incorrect behavior. I my case that resulted in the missing of the END event the next time i tried to send a message.

Related