mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

CatenaStm32L0::Sleep uses STANDBY mode which would reboot system #150

Closed terrillmoore closed 5 years ago

terrillmoore commented 5 years ago

It would reboot the system, if we were using it correctly; you have to clear the WFE bit before requesting it, or it won't happen (instead you do a sleep, it appears, or you come right back, which doesn't seem to happen when testing with stm3l0_pwrtest.ino).

When we fix standby, we'll break this. We need to change to request Stop. Luckily, this is all inside the current platform code (no cross-library headaches) as long as we fix Stop before we add code to clear WFE.