XBee® Wi-Fi RF Modules
© 2013 Digi International, Inc. 49
When using the SPI, either SleepRq or SPI_nSSEL may be used for pin sleep. If D8 is
configured as a peripheral (1), then it will be used for pin sleep. If not, and SPI_nSSEL is
configured as a peripheral (which it must be to enable SPI operation), then SPI_nSSEL is
used for pin sleep.
Using SPI_nSSEL for pin sleep has the advantage of requiring one less physical pin
connection to implement pin sleep on SPI. It has the disadvantage of putting the radio
to sleep whenever the SPI master negates SPI_nSSEL, even if that wasn't the intent.
Therefore, if the user can control SPI_nSSEL, whether or not data needs to be
transmitted, then sharing the pin may be a good option. It makes the SleepRq pin
available for another purpose, or it simply requires one less pin to the SPI interface.
Sleep Options
AP Associated Sleep
This option allows the module to sync up with beacons sent from the AP which contains
the DTIM (Delivery Traffic Indication Message). The DTIM indicates when broadcast and
multicast data will be sent on the network. This property is configured on the AP and is
typically configured as the number of beacons between each beacon with DTIM. The
current draw in associated sleep mode varies significantly. When the module is awake it
draws approximately 100 mA. When it is asleep, it draws approximately 2 mA. Total
current draw increases when the DTIM rate is higher and it decreases when the DTIM
rate is lower on the access point.
The sleep modes are described as follows with this option enabled.
Pin Sleep Mode
UART data can be received in pin sleep mode, whether or not the host asserts the
SleepRq pin. For example, if RF data is received by the module while SleepRq is
asserted, the module will wake up long enough to send the data out the UART and then
immediately resume sleeping. Note that if wake host is configured, the module will
assert the appropriate I/O lines (indicating that it is awake), then wait for wake host
timer to expire, then output the data, and then immediately resume sleeping.
In this mode, when SleepRq is asserted the module will power down the Wi-Fi circuitry.
When SleepRq is de-asserted, the Wi-Fi circuitry is powered up. This causes the module
to associate to the access point for each wake event. If the module was associated
when it went to sleep, it should be ready to transmit data as soon as the On/Sleep pin
indicates that the module is awake. If the module was not associated when it went to
sleep, the host must wait until the module is associated before a transmission can occur.
(In API mode, a modem status frame will be received when the module becomes
associated. Outside of API mode, the AI command must be used to determine when the
module is associated.)