The Sleep Timer; Micropython Sleep Behavior - Digi XBee 3 Cellular LTE-M User Manual

Smart modem
Table of Contents

Advertisement

Sleep modes
DIO8/SLEEP_RQ configured as
peripheral (D8 = 1)?
Yes
Yes
No
No
Advantage of using SPI_SSEL to control sleep:
One less physical pin connection is required to implement pin sleep. This makes DIO8/SLEEP_
n
RQ available for another purpose.
Disadvantages of using SPI_SSEL to control sleep:
The XBee Smart Modem is put to sleep whenever the SPI master negates SPI_SSEL, even if
n
that was not the intent.
The XBee Smart Modem begins entering sleep as soon as the control pin is asserted (brought
n
high). Immediately de-asserting the control pin (bringing it low) only has the effect of
preventing the microcontroller from entering low-power mode before waking up the device—
all other sleep preparations (such as closing sockets) continue as in typical sleep operation.
This can take several seconds, and this added time in the case of an unintended sleep request
may not be acceptable.

The sleep timer

The sleep timer starts when the device wakes and resets on re-configuration. When the sleep timer
expires the device returns to sleep.

MicroPython sleep behavior

When the XBee Smart Modem enters Deep Sleep mode, any MicroPython code currently executing is
suspended until the device comes out of sleep. When the XBee Smart Modem comes out of sleep
mode, MicroPython execution continues where it left off.
Upon entering deep sleep mode, the XBee Smart Modem closes any active UDP connections and turns
off the cellular component. As a result, any sockets that were opened in MicroPython prior to sleep
report as no longer being connected. This behavior appears the same as a typical socket
disconnection event will:
socket.send raises OSError: ENOTCONN
n
socket.sendto raises OSError: ENOTCONN
n
socket.recv returns the empty string, the traditional end-of-file return value
n
socket.recvfrom returns an empty message, for example:
n
(b'', (<address from connect()>, <port from connect()>) )
The underlying UDP socket resources have been released at this point.
Digi XBee® 3 Cellular LTE-M/NB-IoT Global Smart Modem User Guide
DIO3/SPI_SSEL configured as
peripheral (D3 = 1)?
Yes
No
Yes
No
The sleep timer
Pin sleep controlled
by...
DIO8/SLEEP_RQ
DIO8/SLEEP_RQ
DIO3/SPI_SSEL
Neither (pin sleep
does not work)
139

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xbee 3 cellular nb-iot

Table of Contents