This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52: STOP in Rx state -> No event?

I tripped over what appears to be a change in the RADIO between nRF51 and nRF52.

For the particular case of issuing a STOP task when the radio is in Rx mode, there is no END event; observed behavior (watching the area around NRF_RADIO+0x100) is that there is no completion event at all. This of course prevents the END->DISABLE shortcut (nor its software equivalent) from working properly.

Comparing nRF51 RM (v3.0) fig. 22 and nRF52 OPS (v0.6) fig. 30, this change appears to be intentional. An analogous change was also made to STOP-ping in the Tx state, but I think that's a much more unusual case.

In case you're wondering, STOP-ping in Rx state is not so unusual: It's what one does in the case of a timeout, supposing that the other side is never going to answer us.

I was able to succeed by spinning waiting for the STATE to transition to RXIdle, but I wonder if this is what was intended.

Is this the recommended method? If so, how long should I expect this transition to take? (I don't much like spinning without a timeout.)

Parents
  • I am not sure 100% of the rationale behind this but it actually made some sense to me.

    maybe to remove the confusion that, if we generate END event after STOP task, then it can be confused as TX/RX transaction is complete even though it wasn’t!!

    The specific use case you mentioned about STOP-ing on timeout, you can do DISABLE instead of STOP task, that will achieve the same goal instead of STOP_TASK->END_EVENT->DISABLE_TASK.

Reply
  • I am not sure 100% of the rationale behind this but it actually made some sense to me.

    maybe to remove the confusion that, if we generate END event after STOP task, then it can be confused as TX/RX transaction is complete even though it wasn’t!!

    The specific use case you mentioned about STOP-ing on timeout, you can do DISABLE instead of STOP task, that will achieve the same goal instead of STOP_TASK->END_EVENT->DISABLE_TASK.

Children
Related