When I used the code to get the RSSI values for different channels, I found that it was very time-consuming, about 400-500ms, and most of the time was spent waiting (NRF_RADIO->EVENTS_RSSIEND = 1. May I ask why this is? Is there a way to optimize it?
static uint8_t esb_get_rf_channel_rssi(uint8_t ch)
{
nrf_esb_set_rf_channel(ch);
nrf_esb_start_rx();
nrf_delay_us(150);
NRF_RADIO->EVENTS_RSSIEND = 0;
while(NRF_RADIO->EVENTS_RSSIEND == 0);
NRF_RADIO->TASKS_RSSISTART = 0;
uint8_t rssi_reading = NRF_RADIO->RSSISAMPLE;
nrf_esb_stop_rx();
return rssi_reading;
}