
Sleep modes
Use sleep modes to sample data
XBee Wi-Fi RF Module User Guide
54
because the Access Point behaves like the device is in full power mode while it is asleep and it will not
hold back packets until the device wakes up.
Pin Sleep mode
In this mode when SLEEP_RQ is asserted the device powers down the Wi-Fi circuitry. When SLEEP_RQ
is de-asserted the Wi-Fi circuitry is powered up. This causes the device to associate to the access
point for each wake event. If the device was associated when it went to sleep, it should be ready to
transmit data as soon as the ON_SLEEP pin indicates that the device is awake. If the device was not
associated when it went to sleep, the host must wait until the device is associated before a
transmission can occur. In API mode, a modem status frame is received when the device becomes
associated. Outside of API mode,
must be used to determine when the
device is associated.
Cyclic Sleep mode
In this mode the device enters and exits sleep based on the
,
, and SA
commands.
SP
specifies the sleep time and
ST
specifies the wake time of the device after it is
associated.
SA
specifies the maximum time to wait for association before starting the
ST
timer. If
SA
expires before the association process completes, then the device sleeps anyway. When it wakes from
this state, then it starts the
SA
timer again to seek to establish association.
Under normal conditions,
SA
is used for a time out for the first association following reset and
ST
is
used for short wake cycles thereafter. To conserve battery power,
SA
should be long enough for
association and
ST
should be as short as possible for the application.
Use sleep modes to sample data
To sample data when waking from any sleep mode:
1. Enable an ADC or digital input.
2. Set
appropriately with respect to
to obtain the desired
number of samples.
If you want multiple samples during the wake period then user
IR
. This provides
ST
/
IR
+1 samples.
Each sample is sent separately.
delays UART and sample data from being initiated until the timer has expired. This
allows the host to wake up before receiving data or a sensor to power up before an I/O sample is
taken.
Digital outputs and special function outputs such as ON_SLEEP and CTS are not affected by
WH
. This is
to allow these signals to be used to wake up devices.
For deep sleep,
WH
must be expired and the device must be associated before I/O samples are taken.