I’m running v0.7.0 of the Device OS and recently uncovered some very interesting behavior in my product. My product is battery powered and relies heavily on sleep modes. However, due to the deep sleep issue that is still pending resolution I can’t always use the deep sleep option. Specifically, I can’t go into deep sleep while my device is charging because the WKP is high. In this scenario I go into normal sleep instead. While in deep sleep my product draws about 60uA from the battery which is great. Better than listed in the P1 datasheet (likely because of mis-documentation). When my device goes into stop-mode sleep, however, the current consumption is 72mA which is about 70x the datasheet figure of 1-2mA. “Maybe I need to manually shut off WiFi before I go to sleep” I thought. Well, that made it worse sending my sleep current up to 128mA.
Finally I tossed out all of my product code and got back to a simple sketch that would just go to sleep in the setup() function. I found that the only way to get the stated sleep current was to comment out
SYSTEM_MODE(MANUAL). When I did that I measured stop-mode sleep at 800uA which is exactly what I expect.
My question then is this. Is there some manual code I need to add before going into stop-mode sleep on the P1 if I intend to use
SYSTEM_MODE(MANUAL) as well as
SYSTEM_THREAD(ENABLED)? I found Electron SLEEP_MODE_DEEP tips and examples which discusses a similar problem on the Electron but the reason seems to be in how the modem works. Is there a similar issue/workaround possible on the P1? If so, where is this documented so I can use it?
The closest I could find for the P1 was Sleep mode explained using code samples but none of the examples use manual system mode.