Hi there,
I'm developing some proprietary RF application recently with nRF52. In this application, the radio frequency (tx and rx) is changed very often(every 3ms) by calling timeslot API. I know the NRF_RADIO->TASKS_DISABLE =1 should be set before setting another radio frequency. The following is some part of my code.
NRF_RADIO->TASKS_DISABLE = 1;
while (NRF_RADIO->EVENTS_DISABLED == 0) {}
NRF_RADIO->FREQUENCY= freq;
In most case, it seems work well. But, sometimes it will never get events_disabled =1 and can not get out of while loop. Anyone know what's wrong? In addition, is it okay to execute tasks_disable anytime even if the radio state machine is running in the tx or rx?