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?

Parents
  • 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) ;

Reply
  • 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) ;

Children
No Data
Related