
Primitives
Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0
3-4
Freescale Semiconductor
Returns
gErrorNoError_c
Everything is ok and the reception will be requested to the lower layers
gErrorOutOfRange_c One of the members in the
rxPacket_t
structure is out of range (no valid buffer
size or data buffer pointer is NULL).
gErrorNoResourcesAvailable_cRadio is performing another action and could not attend this request.
gErrorNoValidCondition_cSMAC has not been initialized.
Usage
•
Declare a pointer to
rxPacket_t
variable
•
Assign that variable the pointer to an array buffer to be used for the receive packet data.
•
Use that variable as the argument when calling
MLMERXEnableRequest
rxPacket_t *RxPacket;
uint8_t RxDataBuffer[130];
...
RxPacket = (rxPacket_t*)RxDataBuffer;
RxEnableResult = MLMERXEnableRequest(RxPacket, 0);
...
NOTE
•
Return anything different than
gErrorNoError_c
implies that the receiver
did not go into receive mode.
•
32-bit timeout value of zero causes the receiver to never timeout and
stay in receive mode until a valid data packet is received or the
MLMERXDisableRequest function is called.
•
To turn off the receiver before a valid packet is received, the
MLMERXDisableRequest call can be used.
3.1.5
MLMEDozeRequest
The transceiver has low power modes with the reference oscillator disabled (Hibernate) or enabled (Doze).
The Doze request function allows the user to put the radio either in Normal Doze Mode (without CLKO
but with automatic timeout wake-up) or Acoma Doze Mode (with CLKO but without timeout):
•
The reference oscillator is enabled during Doze mode and can be used in two ways -
— The reference oscillator must be enabled to drive the transceiver timer block if the timer is to
be used for wake-up from Doze
— The transceiver provides the CLKO output clock signal which is used by the MCU as a clock
source. While the transceiver is in low power mode, this output can be kept active to supply
clock to the MCU
•
The function call passes an argument that sets a timeout/wake-up value for Doze mode -
— The argument is a 32-bit value, however, the maximum value is 0x00FFFFFF
— The total time period equals: value x (transceiver timer clock period). The timer clock period
is determined by the frequency set by the MLMESetTmrPrescale function, see
Section 3.1.15,
“MLMESetTmrPrescale
”.