User’s Manual
63
Two additional parameters are described below for completeness.
•
WH determines how long the XBee RF module will hold a message for the RCM4510W to
receive. Like ST, this parameter must be set carefully to ensure no messages are lost at startup.
It is currently set to 3 seconds.
•
SO is a conditional flag and determines whether the XBee RF module will wake the Rabbit
4000 microprocessor if SN and SP expire, or whether both parameters are reset to resume the
sleep mode immediately.
There are several important ramifications and interactions with the operation of other function
calls to consider when using the sleep mode.
•
When the Rabbit 4000 microprocessor wakes up from sleep, both the RCM4510W and user
application will fully restart. The user program will not resume from the point at which it went
to sleep.
•
User data should be initialized prior to calling
xbee_init()
to ensure that cluster functions
or the default message handler process an incoming wake message correctly.
•
When sleep is initiated, both the XBee RF module and the Rabbit 4000 microprocessor will
remain awake for the time in ST before actually powering down the Rabbit 4000 microproces-
sor and entering a low-power mode. Any messages received during this time period will cause
the counter to reset, and must be processed immediately or be lost.
•
An end device is always preparing to sleep. Use
xb_stayawake()
to set ST to its maximum
value and periodically send data to the XBee RF module to keep it awake. Blocking for long
periods of time and failing to call
xb_tick()
for more than 30 seoconds could result in the
RCM4510W going to sleep unexpectedly.
The
SLEEPMODE.C
and
SLEEPMODE2.C
sample programs in the Dynamic C
SAMPLES\
RCM4500W\XBEE
folder and the function documentation for
zb_Rabbit_poweroff()
and
xb_
sleep()
provide more specific information regarding the implementation and use of the sleep
mode.