
Primitives
Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0
3-6
Freescale Semiconductor
3.1.6
MLMEEnergyDetect
The transceiver can turn on the receiver and sample any energy present on the selected channel frequency.
This function calls an energy detect (ED) cycle and returns detected the energy value via the return
argument.
•
The receiver is enabled on the channel previously selected by MLMESetChannelRequest ().
•
Similar to the LQI, this function returns an integer byte value. This binary value can be translated
into a measurement of received signal strength in dBm via the equation:
dBm = - (Link Quality[7:0]/2)
dec
Prototype
uint8_t MLMEEnergyDetect(void);
Arguments
None
Returns
UINT8
An unsigned 8-bit value representing the energy on the current channel.
Usage
The function is simply called. The returned value is the energy detected on the presently selected channel.
NOTE
SMAC provides the MLMEScanRequest function as the default means to
do energy detect or a CCA function across multiple channels. However, the
transceiver is also capable doing a single CCA cycle instead of a simple ED;
see the appropriate device reference manual. The MLMEEnergyDetect
function source can be used as a prototype to provide a CCA function.
3.1.7
MLMEFEGainAdjust
The transceiver has an offset parameter that compensates the energy detection scheme used during an ED,
CCA, or LQI measurement. This function allows users to adjust the results (plus or minus) as required for
loss or gain from external components.
NOTE
This parameter is called POWER_COMP[7:0] on the MC13202 and
MC13213 platforms. It is called CCA_OFFSET_CMP on the MC1323x
platform
•
The default value out of reset is 0x8D