Skip to content

efr32 CSMA done twice? #2379

@tomas-c

Description

@tomas-c

It seems that both the radio and OpenThread perform CSMA.

In efr32 radio.c function otPlatRadioTransmit

RAIL_CsmaConfig_t csmaConfig = RAIL_CSMA_CONFIG_802_15_4_2003_2p4_GHz_OQPSK_CSMA;
...
railTxStatus = RAIL_TxStartWithOptions(aFrame->mChannel, &txOption, RAIL_CcaCsma, &csmaConfig);

RAIL_CSMA_CONFIG_802_15_4_2003_2p4_GHz_OQPSK_CSMA is

/**
 * @def RAIL_CSMA_CONFIG_802_15_4_2003_2p4_GHz_OQPSK_CSMA
 * @brief RAIL_CsmaConfig_t initializer configuring CSMA per 802.15.4-2003
 * on 2.4 GHz OSPSK, commonly used by ZigBee.
 */
#define RAIL_CSMA_CONFIG_802_15_4_2003_2p4_GHz_OQPSK_CSMA {                    \
    /* CSMA per 802.15.4-2003 on 2.4 GHz OSPSK, commonly used by ZigBee     */ \
    /* csmaMinBoExp */ 3,   /* 2^3-1 for 0..7 backoffs on 1st try           */ \
    /* csmaMaxBoExp */ 5,   /* 2^5-1 for 0..31 backoffs on 3rd+ tries       */ \
    /* csmaTries    */ 5,   /* 5 tries overall (4 re-tries)                 */ \
    /* ccaThreshold */ -75, /* 10 dB above sensitivity                      */ \
    /* ccaBackoff   */ 320, /* 20 symbols at 16 us/symbol                   */ \
    /* ccaDuration  */ 128, /* 8 symbols at 16 us/symbol                    */ \
    /* csmaTimeout  */ 0,   /* no timeout                                   */ \
}

so SiLabs Rail is set to use CSMA.

Now if we look into MAC layer, we see that before transmitting it calls RadioSupportsCsmaBackoff() and if it returns false - performs its own CSMA. In efr32 radio.c function, otPlatRadioGetCaps doesn't set OT_RADIO_CAPS_TRANSMIT_RETRIES or OT_RADIO_CAPS_CSMA_BACKOFF bits so this is precisely what happens.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions