CCA Measurement

This section describes, how the CCA measurement for the current channel is done. CCA stands for "clear channel assessment" and is a procedure which is used before transmitting a frame in order to ensure, that the transmission of another station is not disturbed.

The CCA measurement is controlled with two parameters mode and edthrs:

Parameters:
mode  The CCA-Mode parameter is set in the sub register SR_CCA_MODE and has the following meaning:
mode=1
Energy above threshold.
CCA shall report a busy medium upon detecting any energy above the ED threshold.
mode=2
Carrier sense only.
CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4. This signal may be above or below the ED threshold.
mode=3
Carrier sense with energy above threshold.
CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4 with energy above the ED threshold.
edthrs  If a signal is present, which has an energy value above the energy threshold, the CCA measurement reports a busy medium. The edtrhs value is a 4 bit value, which is converted to an energy value with energy_thrs/dBm=RSSI_BASE_VAL+2*edthrs. This parameter is only relevant for mode=1 and mode=3.

The CCA measurement itself is carried out with one of the sequences PHY_DO_CCA. It returns two values cca and done:

Return values:
cca  This parameter is retrieved from the sub register SR_CCA_STATUS and has the following meaning:
  • 0 : medium is busy
  • 1 : medium is free
done  This parameter is retrieved from the sub register SR_CCA_DONE. The value 1 means, that a previously started CCA measurement is completed correctly, otherwise the CCA measurement is not (yet) completed.
Note:
Each read access to register RG_TRX_STATUS resets the sub registers SR_CCA_STATUS and SR_CCA_DONE. Therefore the register RG_TRX_STATUS needs to be read only once to a variable trx_status and the values for cca and done needs to be extracted by computing cca = (trx_status>>6)&1 and done = (trx_status>>7)&1.
The following methods are defined:


PHY_SET_CCA_MODE

This sequence sets the parameters mode and edthrs for the CCA measurement.

inline_mscgraph_51
Code example

PHY_GET_CCA_MODE

This sequence returns the currently configured parameters mode and edthrs .

inline_mscgraph_52
Code example

PHY_DO_CCA

This sequence assumes that the CCA measurement was previously configured according to PHY_SET_CCA_MODE.

CCA measurements can be done from state PLL_ON. The measurement is started by switching to state RX_ON and writing the value 1 to the sub register SR_CCA_REQUEST. The measurement is finished after 140us and the radio transceiver is switched back to state PLL_ON.

The completion of the measurement can be verified in the sub register SR_CCA_DONE. In general, the result parameters for the measurement need special handling, which is described here.

inline_mscgraph_53
Code example
    trx_bit_write(SR_TRX_CMD, CMD_RX_ON);
    delay_us(1);
    trx_bit_write(SR_CCA_REQUEST, 1);
    delay_us(140);
    stat = trx_reg_read(RG_TRX_STATUS);
    trx_bit_write(SR_TRX_CMD, CMD_PLL_ON);
    cca=(stat>>6)&1;
    done=(stat>>7)&1;
    ASSERT(done==1);

Generated on Fri Aug 10 16:10:05 2007 for SWPM AT86RF230 Rev. A by  doxygen 1.5.2