bare-metal RADIO RX with a timeout

i working bare-metal, using HW registers directly....  no zephyr, no SDC....

i'm able to successfully receive packets through the RADIO RX path, but now want to add a timeout....

as the RADIO doesn't expose its own timer for this purpose, i'm using a GRTC channel....

question: when the timer expires (and no packet has been received), how should i abort the ongoing RX -- TASKS_STOP, TASKS_DISABLE, etc ???

let's assume my GRTC interrupt handler will (somehow?) abort the RX and then set some rx_timeout flag....

is the RADIO interrupt handler subsequently invoked as part of aborting the RX -- where i could then test rx_timeout to understand how i terminated???

this use-case was not described in an obvious way (to me) in the HW datasheet.... 

Parents
  • Hi

    I don't see an obvious issue with using the TASKS_STOP for stopping the radio's RX when this timeout is triggered.

    I'm not sure I understand your other question. Use the INTENSET and INTENCLR registers to enable or disable interrupts in the RADIO peripheral if needed. Telling the GRTC to trigger the radio to stop should be doable from what I can see.

    That being said, since you're working entirely bare metal, what we can assist with in terms of application development is somewhat limited, but I'm sure you're aware of that.

    Best regards,

    Simon

Reply
  • Hi

    I don't see an obvious issue with using the TASKS_STOP for stopping the radio's RX when this timeout is triggered.

    I'm not sure I understand your other question. Use the INTENSET and INTENCLR registers to enable or disable interrupts in the RADIO peripheral if needed. Telling the GRTC to trigger the radio to stop should be doable from what I can see.

    That being said, since you're working entirely bare metal, what we can assist with in terms of application development is somewhat limited, but I'm sure you're aware of that.

    Best regards,

    Simon

Children
No Data
Related