Clean radio events

Hello !

Can I clean all radio events in more efficient way , by using one line of code ?

Now, after each RX/TX operation I disable radio ( INT disabled and cleaned as well) and clear all events :

nrf_radio_task_trigger(NRF_RADIO, NRF_RADIO_TASK_DISABLE);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DISABLED);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_READY);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_TXREADY);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_RXREADY);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_FRAMESTART);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_PAYLOAD);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_END);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_PHYEND);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_CRCOK);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_CRCERROR);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DEVMATCH);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_DEVMISS);
nrf_radio_event_clear(NRF_RADIO, NRF_RADIO_EVENT_BCMATCH);
Regards,
Eugene
Parents
  • Hi Euguene

    There is no function that does this, as each register must be written to 0 separately. What you could do is to create a function that calls all these event clears.

    Best regards,

    Simon

  • Hi Simon !

    But what about power off of radio after each transaction ? Can it clean all events  and also save power between rare tx/rx activity ?

    NRF_RADIO->POWER = 0UL;
    NRF_RADIO->POWER = 1UL;
    I'm not use radio powering off with nRF53 and Zephyr yet. I need to add anomaly to code for load some calibration values.
    But in nRF52 old code ( SDK/Contiki-ng based ) powering on/off is in use but it is not so clear what benefit it bring if any.
    May be it was added due fact that radio sometimes freeze when USB cable connected/disconnected on fly on nRF52 board.
    Regards,
    Eugene
Reply
  • Hi Simon !

    But what about power off of radio after each transaction ? Can it clean all events  and also save power between rare tx/rx activity ?

    NRF_RADIO->POWER = 0UL;
    NRF_RADIO->POWER = 1UL;
    I'm not use radio powering off with nRF53 and Zephyr yet. I need to add anomaly to code for load some calibration values.
    But in nRF52 old code ( SDK/Contiki-ng based ) powering on/off is in use but it is not so clear what benefit it bring if any.
    May be it was added due fact that radio sometimes freeze when USB cable connected/disconnected on fly on nRF52 board.
    Regards,
    Eugene
Children
No Data
Related