Energy detection (ED)

nRF54L15 | nRF54L10 | nRF54L05 Datasheet

In order to determine the presence of activity, IEEE 802.15.4 requires that the received signal power within the channel bandwidth can be sampled.

To prevent the channel signal from being decoded, the shortcut between the READY event and the START task should be disabled before putting RADIO in RX mode. The energy detection (ED) measurement time, where RSSI samples are averaged, is 8 symbol periods, corresponding to 128 µs. The standard further specifies the measurement to be a number between 0 and 255, where 0 indicates received power less than 10 dB above the selected receiver sensitivity. The power range of the ED values must be at least a 40 dB linear mapping with accuracy of ±6 dB. See section 6.9.7 Receiver ED in IEEE 802.15.4 for further details.

The following example shows how to perform a single energy detection measurement and convert to IEEE 802.15.4 scale.

IEEE 802.15.4 ED measurement example

#define ED_RSSISCALE 4 // From electrical specifications
uint8_t sample_ed(void)
{
    int val;
    NRF_RADIO->TASKS_EDSTART = 1; // Start
    while (NRF_RADIO->EVENTS_EDEND != 1) {
        // CPU can sleep here or do something else
        // Use of interrupts are encouraged
        }
    val = NRF_RADIO->EDSAMPLE * ED_RSSISCALE; // Read level
    return (uint8_t)(val>255 ? 255 : val);    // Convert to IEEE 802.15.4 scale
}

For scaling between hardware value and dBm, see Clear channel assessment (CCA).

The mlme-scan.reqprimitive of the MAC layer uses the ED measurement to detect channels where there might be wireless activity. To assist this primitive, a tailored mode of operation is available where the ED measurement runs for a defined number of iterations keeping track of the maximum ED level. This is engaged by writing the EDCNT field of the EDCTRL register to a value different from 0, where it will run the specified number of iterations and report the maximum energy measurement in the EDSAMPLE register. The scan is started with the EDSTART task and the end indicated with the EDEND event. This significantly reduces the interrupt frequency and therefore power consumption. The following figure shows how the ED measurement will operate depending on the EDCNT and EDPERIOD fields of the EDCTRL register.

Figure 18. Energy detection measurement for a single iteration (EDCNT = 0)
Page-1 Sheet.977 EDSTART EDSTART Sheet.982 EDEND EDEND Rectangle.1018 Scan 0 Scan 0 Dynamic connector Dynamic connector.1021 Dynamic connector.1028 Sheet.1023 EDPERIOD×4 µs EDPERIOD×4 µs
Figure 19. Energy detection measurement example with multiple iterations
Page-1 Sheet.996 EDSTART EDSTART Sheet.1008 ... Sheet.1009 Sheet.1010 ... ... Rectangle.1022 Scan 0 Scan 0 Dynamic connector.1023 Rectangle.1024 Scan 1 Scan 1 Rectangle.1025 Scan EDCNT-1 Scan EDCNT-1 Sheet.1026 EDEND EDEND Dynamic connector.1027 Dynamic connector.1028 Sheet.1029 EDCNT×EDPERIOD×4 µs EDCNT×EDPERIOD×4 µs

The scan is stopped by writing the EDSTOP task. It is followed by the EDSTOPPED event when the module has terminated.