Sleep support
Sleep modes
Digi XBee® 3 802.15.4 RF Module User Guide
124
Sleep modes
Sleep modes enable the device to enter states of low-power consumption when not in use. To enter
Sleep mode, the following conditions must be met:
n
A valid sleep mode is selected via
SM
(
SM
=
1
,
4
,
5
, or
6
)
n
DTR/SLEEP_RQ (TH pin 9/SMT pin 10) is asserted (when
SM
=
1
or
5
)
n
The device is idle (no data transmission or reception) for the amount of time defined by
(when
SM
=
4
or
5
)
The following table shows the sleep mode configurations.
Sleep
mode
Description
SM 0
No sleep
SM 1
Pin sleep
SM 4
Cyclic sleep
SM 5
Cyclic sleep with pin wake-up
SM 6
MicroPython sleep (with optional pin wake). For complete details see the
Pin Sleep mode (SM = 1)
Pin Sleep mode minimizes quiescent power (power consumed when in a state of rest or inactivity). In
order to use Pin Sleep mode, configure
D8 (DIO8/DTR/SLP_Request Configuration)
(TH pin 9/SMT pin
10) for DTR/SLEEP_RQ input (
D8
=
1
). This mode is voltage level-activated; when SLEEP_RQ is
asserted, the device finishes any transmit or receive activities, enters Idle mode, and then enters a
state of sleep. The device does not respond to either serial or RF activity while in pin sleep.
To wake a sleeping device operating in Pin Sleep mode, de-assert DTR/SLEEP_RQ. The device wakes
when SLEEP_RQ is de-asserted and is ready to transmit or receive when the CTS line is low. When
waking the device, the pin must be de-asserted at least two 'byte times' after CTS goes low. This
assures that there is time for the data to enter the DI buffer.
Devices with SPI functionality can use the SPI_SSEL pin instead of
D8
for pin sleep control. If
D8
=
0
and
P7
=
1
, SPI_SSEL takes the place of DTR/SLEEP_RQ and functions as described above. In order to
use SPI_SSEL for sleep control while communicating on the UART, the other SPI pins must be disabled
(
P5
,
P6
, and
P8
set to
0
). See
for information on using SPI_SSEL for sleep control
while communicating over SPI.
Cyclic Sleep mode (SM = 4)
The Cyclic Sleep modes allow devices to periodically check for RF data. When the
SM
parameter is set
to
4
, the XBee 3 802.15.4 RF Module is configured to sleep, then wakes once per cycle to check for
data from a coordinator. The Cyclic Sleep Remote sends a poll request to the coordinator at a specific
interval set by the
SP
(Cyclic Sleep Period) parameter. The coordinator transmits any queued data
addressed to that specific remote upon receiving the poll request.
If the coordinator does not respond with queued data and no UART activity is detected, the device will
immediately sleep. If it detects any activity (RF or UART), then the device wakes for
ST
time. You can
also set
SO
bit 8 to force the device to always wake for the full
ST
time.