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

Reading radio background noise level using nRF51 or nRF52

Hi,

I need to monitor radio channels and find the best one (with lower background noise) to use.
Is there any way to measure radio signal level in a particular frequency on nRF51 or nRF52? I'm looking for somthing similar (or better with more details) to Received Power Detector (RPD) on nRF24L01+.

I tryed using RSSISTART and reading RSSISAMPLE values but it seems nRF51/52 measurses the signal level only when it receives a packet!

Thanks.

Parents
  • The sample period of the RSSI is defined by RSSIPERIOD, see the device product specification for details (minimum 8.8µs on nRF51822, typical 8µs on nRF52832). The RSSI sample will hold the average received signal strength during this sample period.

    Here is an example for the nRF51:

    int do_rssi_sampling(uint32_t channel)
    {
    NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Enabled << RADIO_SHORTS_READY_START_Pos;
    
    NRF_RADIO->FREQUENCY = channel;
    NRF_RADIO->TASKS_RXEN = 1;
    while (!NRF_RADIO->EVENTS_READY);
    NRF_RADIO->EVENTS_READY = 0;
    
    NRF_RADIO->TASKS_RSSISTART = 1;
    while(!NRF_RADIO->EVENTS_RSSIEND);
    NRF_RADIO->EVENTS_RSSIEND = 0;
    
    uint32_t result = NRF_RADIO->RSSISAMPLE;
    
    NRF_RADIO->TASKS_RSSISTOP = 1;
    
    NRF_RADIO->TASKS_DISABLE = 1;
    while (!NRF_RADIO->EVENTS_DISABLED);
    NRF_RADIO->EVENTS_DISABLED = 0;
    return result;
    }
    
Reply
  • The sample period of the RSSI is defined by RSSIPERIOD, see the device product specification for details (minimum 8.8µs on nRF51822, typical 8µs on nRF52832). The RSSI sample will hold the average received signal strength during this sample period.

    Here is an example for the nRF51:

    int do_rssi_sampling(uint32_t channel)
    {
    NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Enabled << RADIO_SHORTS_READY_START_Pos;
    
    NRF_RADIO->FREQUENCY = channel;
    NRF_RADIO->TASKS_RXEN = 1;
    while (!NRF_RADIO->EVENTS_READY);
    NRF_RADIO->EVENTS_READY = 0;
    
    NRF_RADIO->TASKS_RSSISTART = 1;
    while(!NRF_RADIO->EVENTS_RSSIEND);
    NRF_RADIO->EVENTS_RSSIEND = 0;
    
    uint32_t result = NRF_RADIO->RSSISAMPLE;
    
    NRF_RADIO->TASKS_RSSISTOP = 1;
    
    NRF_RADIO->TASKS_DISABLE = 1;
    while (!NRF_RADIO->EVENTS_DISABLED);
    NRF_RADIO->EVENTS_DISABLED = 0;
    return result;
    }
    
Children
Related