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

Can nRF52 measure RF channel energy in 2Mbps mode?

I am currently using the nRF24L01P in an application where I am using the RPD feature to determine whether a 2MHz RF channel is "available". For example, if a wifi network is consuming channels 0-40 then I can see this because the RPD feature will show significant RF energy on these channels. Using this information I know that these channels are unavailable for my network.

We are adding features and porting the design to nRF52. I do not see this RPD feature available in nRF52 (nor is it available in nRF51). Both nRF51 and nRF52 radios have an RSSI indication, and nRF52 also has an Energy Detect (ED) feature but it is only described under the section pertaining to 802.15.4.

Can the nRF52 ED or RSSI features be used to detect any RF energy on a given RF channel when the radio is configured for the proprietary Nordic 2Mbit modulation?

  • Yes I believe so, but I have not tried it myself:

    From Received Signal Strength Indicator (RSSI):

    "The radio implements a mechanism for measuring the power in the received radio signal. This feature is called Received Signal Strength Indicator (RSSI).

    Sampling of the received signal strength is started by using the RSSISTART task. The sample can be read from the RSSISAMPLE register.

    The sample period of the RSSI is defined by RSSIPERIOD, see the device product specification for details. The RSSI sample will hold the average received signal strength during this sample period.

    For the RSSI sample to be valid the radio has to be enabled in receive mode (RXEN task) and the reception has to be started (READY event followed by START task)."

    From Received Signal Strength Indicator (RSSI) specifications
    RSSIPERIOD: Sample period = 0.25 us.


     

  • Right, this is also my understanding from reading the documentation as well. It looks like I will need to create a very quick test and interfere with various sources to see how the RSSI responds.

    Are you able to tell me if the "width" of the radio channel is taken into account when measuring RSSI? e.g. if configured for 2Mbps and tuned to channel 5, will an RSSI measurement measure the energy present from 2404.5MHz through 2405.5MHz? If I have an interference source on channel 4 and it is 1MHz wide (from 2403.5MHz to 2404.5MHz) will the RSSI measurement "see" this and report energy present on channel 5?

  • Yes, your assumptions are correct. The channel width of the radio is 1.2MHz, with the last 100kHz above and below the channel highly attenuated. 

    See the Radio Transmitter Example and Radio Receiver Example

     

  • Just an update to close out this thread:

    One thing I noticed with nRF52 which was not (an apparent) problem on nRF51 is that you *must* wait for the radio's READY event before issuing an RSSISTART task. On nRF51 it seemed like the radio hardware would wait for READY before starting the measurement, but on nRF52 if you issue RSSISTART before the READY event fires you will get an immediate RSSIEND with an invalid measurement of 0x7f.

    This is the code which correctly tunes and starts an RSSI measurement for me, and which can receive a packet if one happens to come by:

    /* remove all short circuits (some will move the radio right out of the disabled state we want) */
    NRF_RADIO->SHORTS = 0;
    
    NRF_RADIO->EVENTS_DISABLED = 0;
    NRF_RADIO->TASKS_DISABLE = 1;
    while (NRF_RADIO->EVENTS_DISABLED == 0) ;
    
    NRF_RADIO->FREQUENCY = chan;
    NRF_RADIO->SHORTS = RADIO_SHORTS_READY_START_Msk | RADIO_SHORTS_END_DISABLE_Msk | RADIO_SHORTS_DISABLED_RXEN_Msk;
    NRF_RADIO->EVENTS_READY = 0;
    NRF_RADIO->TASKS_RXEN = 1;
    
    while (NRF_RADIO->EVENTS_READY == 0) ;

Related