With the latest development version the deep sleep function seems to be misbehaving. It goes to sleep, but does not start when power cycled. You have to wait a minute before the openmv will start again. I initially thought the problem was with the wake pin, but I am fairly sure it is deep sleep. I put blinky sample on the internal disk. Then with the deep sleep sample, Comment out the rtp.wakeup as it fails, then run in the IDE. Sleep is entered. Power cycle (say 5 seconds) the openmv and blinky does not run. Power LED stays off. Alternatively add the code to setup the wake pin as an input, run the deep sleep sample and pull the pin to gnd. Blinky does not start. This was OK in 4.5.2 Wait a minute with the power off and it will start up again and run blinky.
Which board has the issue?
EDIT: I see, the RT1062.
Mmm, none of that logic has been touched in the development firmware. Curious it stopped working well. I will debug.
No, there’s no issue. So, what’s happening is that the caps from the board (220uF x2) are keeping the deepsleep logic alive on the processor.
It’s still deep sleeping even though you removed all power. Our 30uA draw is so low that the system can survive on the caps for several seconds.
Deepsleep is provided by hardware on the IMXRT1062 chip. There’s no software for it.
When the board enters deep sleep it will only wakeup on the wakeup pin if that was armed in the deep sleep call, RTC, or from the power button input turning it on. When you removed power from the system the 440uF will keep it alive for a while before it truly dies.
Hmmm, a few seconds is an understatement. Like minutes actually.
Depending on your use case this is a feature or a bug. Either way, it’s not going to change.
Thanks for the explanation. I think I am missing the ‘arm’ wakeup pin deep sleep parameter. What should that be? I think it worked without a parameter in 4.5.2. I will revert to that tomorrow.
Hi, I just checked… it looks like a header file changed on the RT1062 firmware in micropython 1.22 that disabled the wakeup pin. There was an ifdef that just got not compiled anymore.