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

Radiated Immunity Certification problems/Unclear documentation about CCA

Hello there,

We're developing a chip with a nRF52840 as the only processor, which we're trying to get certified against 802.15.4. However, we had problems passing the radiated immunity test. We realized we didn't use the ack/resend functionality of 802.15.4, and that we probably wanted another CCA setting, so we made those changes in the software, and sent a new sample to the test lab. However, the new sample performed worse (dropped "most" instead of "some" packages, with variations depending on the external emission frequency). This surprised us.

As the documentation is slightly unclear on the following, my questions (to start with) are:

1. Given the configuration in the code snippet below, will the chip use Energy Detection as well as Carrier Detect, then report the channel clear to send on if at least one of the two measurements reports the channel clear?

2. Given the same snippet, will we actually set the Energy Detection to -80 dBm? That is, will ED report the channel clear to send on if the measured energy is beneath -80 dBm?

nrf_802154_cca_cfg_t cca_cfg = {
    .mode = NRF_RADIO_CCA_MODE_CARRIER_AND_ED,
    .ed_threshold = (uint8_t) -80,
    .corr_threshold = 0,
    .corr_limit = 0
};
nrf_802154_cca_cfg_set(&cca_cfg);


Other details:
Specific version of the nRF52, as read from the etching on the hardware:
N52840
Q1AAC0
1816AU

nRF5 SDK v15.0.0
nRF IEEE 802.15.4 radio driver 1.1.0
We use a Front End Module (FEM), SE2431L, which is controlled by the following insert into the 802.15.4 driver state machine:
/** Set driver state.
 *
 * @param[in]  state  Driver state to set.
 */
static void state_set(radio_state_t state)
{
    m_state = state;

    printf("%s", str_set);
    switch (state)
    {
        case RADIO_STATE_SLEEP:
        case RADIO_STATE_FALLING_ASLEEP:
        	antenna_sleep_mode();
            printf("%s", str_s);
            break;
        case RADIO_STATE_RX:
        case RADIO_STATE_RX_ACK:
            antenna_rx_mode();
            printf("%s", str_r);
//			antenna_bypass_mode();
            break;
        case RADIO_STATE_TX_ACK:
        case RADIO_STATE_CONTINUOUS_CARRIER:
        case RADIO_STATE_CCA_TX:
        case RADIO_STATE_TX:
            antenna_tx_mode();
            printf("%s", str_t);
            break;
        case RADIO_STATE_ED:
        case RADIO_STATE_CCA:
        default:
            antenna_bypass_mode();
            printf("%s", str_b);
            break;
    }

    nrf_802154_log(EVENT_SET_STATE, (uint32_t)state);
}


For the resend functionality, we let the chip send 4 times total before giving up.
The certification test setup has two copies of our chip, one which sends every second, and one that receives those messages and send them to a connected computer which logs when a message is missed.

Thank you in advance,

Gabriel


Parents
  • Hi Gabriel,

    Q1: The following is stated in the nRF52840 PS

    IEEE 802.15.4 implements a listen-before-talk channel access method to avoid collisions when transmitting
    - namely carrier sense multiple access with collision avoidance (CSMA-CA). The key part of this is
    measuring if the wireless medium is busy or not.
    At least three methods must be supported:
    4413_417 v1.0 298
    Peripherals
    • Mode 1 (energy above threshold): The medium is reported busy upon detecting any energy above theED threshold
    • Mode 2 (carrier sense only): The medium is reported busy upon detection of a signal compliant with the IEEE 802.15.4 standard with the same modulation and spreading characteristics
    • Mode 3 (carrier sense and threshold): The medium is reported busy by logically ANDing or ORing the
    results from mode 1 and mode 2.

    Hence, both the ED and Correlator threshold must be met for a channel to be reported clear when using NRF_RADIO_CCA_MODE_CARRIER_AND_ED. If only one should be enough, then you should use NRF_RADIO_CCA_MODE_CARRIER_OR_ED .

    Q2: Yes, if the Energy Detect Threshold is set to -80, then the channel will be reported as clear if the measured energy is below -80dBm.

    BEst regards

    Bjørn

  • Hello, Bjørn.

    After doing some double-checking on my own, I'm afraid I've arrived at the conclusion that both your answers are factually incorrect. I'd like to show my findings for any others with the same problems:

    1. I used our send/receive software for the certification and only changed the cca settings between reflashing. When I set the mode to ED only, and the limit to -94 (which is the minimum), the TX side stops sending due to background noise, as expected. My results of the remaining modes are presented in this table:

    ED -94 - No packets arrive
    ED -74 - Packets arrive
    CARRIER - Packets arrive
    CARRIER_AND_ED -94 - Packets arrive
    CARRIER_AND_ED -74 - Packets arrive
    CARRIER_OR_ED -94 - No packets arrive
    CARRIER_OR_ED -74 - Packets arrive

    Due to those results, the only conclusion I can find is that you're supposed to read the documentation as "the medium is busy if ed AND carrier is reported busy". If you want to send when one of the CCA methods are okay, you should use AND. I'd like to request an update of the documentation, as there clearly is ambiguity.

    2. I found some release notes for your 802.15.4 library:

    https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/master/release_notes/nrf_802154_1.1.0.md 

    which speaks of the following function being added:

    https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/master/src/nrf_802154.h#L225

    It's a conversion function from dBm to CCAEDTHRESH value that in essence subtracts -94 from the input number. This means writing 0 to the register in question will result in an ED threshold at -94 dBm. This means setting that number to -80 will result in an ed threshold at (255 - 80 - 94) = +81 dBm. Instead, you should use the above mentioned function like the following, or just add 94 to the requested dBm value before setting it:

        nrf_802154_cca_cfg_t cca_cfg = {
            .mode = NRF_RADIO_CCA_MODE_ED,
            .ed_threshold = nrf_802154_ccaedthres_from_dbm_calculate(-74),
            .corr_threshold = 0,
            .corr_limit = 0
        };

    This is confirmed by my tests of setting the CCAEDTHRESH 0, which gives no received packets, and then to -1, which loops around to 255 and always sends, letting packets get through. This would not be the case if the provided value would be interpreted as dBm.

    I'd like to request another update of the documentation here, preferably in the table which is under 6.20.14.38 CCACTRL in the nRF52840_PS_v1.0.pdf version of the documentation. That's where I went to find out.

    Thank you for your help either way!

    Gabriel

Reply
  • Hello, Bjørn.

    After doing some double-checking on my own, I'm afraid I've arrived at the conclusion that both your answers are factually incorrect. I'd like to show my findings for any others with the same problems:

    1. I used our send/receive software for the certification and only changed the cca settings between reflashing. When I set the mode to ED only, and the limit to -94 (which is the minimum), the TX side stops sending due to background noise, as expected. My results of the remaining modes are presented in this table:

    ED -94 - No packets arrive
    ED -74 - Packets arrive
    CARRIER - Packets arrive
    CARRIER_AND_ED -94 - Packets arrive
    CARRIER_AND_ED -74 - Packets arrive
    CARRIER_OR_ED -94 - No packets arrive
    CARRIER_OR_ED -74 - Packets arrive

    Due to those results, the only conclusion I can find is that you're supposed to read the documentation as "the medium is busy if ed AND carrier is reported busy". If you want to send when one of the CCA methods are okay, you should use AND. I'd like to request an update of the documentation, as there clearly is ambiguity.

    2. I found some release notes for your 802.15.4 library:

    https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/master/release_notes/nrf_802154_1.1.0.md 

    which speaks of the following function being added:

    https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver/blob/master/src/nrf_802154.h#L225

    It's a conversion function from dBm to CCAEDTHRESH value that in essence subtracts -94 from the input number. This means writing 0 to the register in question will result in an ED threshold at -94 dBm. This means setting that number to -80 will result in an ed threshold at (255 - 80 - 94) = +81 dBm. Instead, you should use the above mentioned function like the following, or just add 94 to the requested dBm value before setting it:

        nrf_802154_cca_cfg_t cca_cfg = {
            .mode = NRF_RADIO_CCA_MODE_ED,
            .ed_threshold = nrf_802154_ccaedthres_from_dbm_calculate(-74),
            .corr_threshold = 0,
            .corr_limit = 0
        };

    This is confirmed by my tests of setting the CCAEDTHRESH 0, which gives no received packets, and then to -1, which loops around to 255 and always sends, letting packets get through. This would not be the case if the provided value would be interpreted as dBm.

    I'd like to request another update of the documentation here, preferably in the table which is under 6.20.14.38 CCACTRL in the nRF52840_PS_v1.0.pdf version of the documentation. That's where I went to find out.

    Thank you for your help either way!

    Gabriel

Children
No Data
Related