I’ve spent the last couple of weeks working on the W32K sleep mode for the SL808x. I encountered a number of hurdles preventing the device from properly going to sleep. None of these items listed below were given any reference I could find in the Sierra documentation for W32K mode. They all proved to be easy fixes but extremely difficult to uncover. The sleep mode I am using is AT+W32K=1,0 (DTR ignored). The forum proved helpful so here’s me giving back…
UART1 flow control (AT+IFC)
By default UART1 is set with hardware flow control activated (AT+IFC=1,1). Unless you close the UART before entering sleep, the module will buffer data from unsolicited responses and/or your own debugging outputs. This doesn’t allow UART1 to enter its sleep state, which in turn prevents the module from entering sleep. Turn off flow control with AT+IFC=0,0 to avoid this. My recommendation to Sierra would be to default with flow control off or at least break the link between flow control and UART1s ability to enter sleep.
Development mode debug traces (AT+WDM)
If you use developer studio as your terminal connection, it will automatically put your device in to development mode (AT+WDM=1) when you upload SW or use traces. CAUTION: if you simply unplug the serial cable from your device without formally closing the port your device will be stuck in development mode. This means traces will continually be sent to UART1 and the device will never properly enter sleep. Even if you’ve removed flow control as described above. To make things worse, this setting is automatically saved to flash so a reboot or power cycle will not fix the issue. If you deploy a device in this state I don’t know if there is any way to recover from it remotely.
Cyclic timers
I found timers running during sleep mode had a substantial effect on the power consumption. Running a perpetual timer at a fast rate increases the power consumption by almost 2-3 times. I’ve been able to achieve the theoretical 2.5 mA draw by properly managing cyclic timers running while asleep.
These may or may not apply to other modules.