Just to add, the words I use for sleep are a bit misleading...
setDeepSleep(0) the STM32 goes into SLEEP mode (via __WFI) when it's not doing anything - all peripherals are still powered on.
setDeepSleep(1) the STM32 goes into STOP mode when it's not doing anything - the high speed oscillator is off, as are most peripherals. It would be the default, but having it on means USARTs/etc won't work.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just to add, the words I use for sleep are a bit misleading...
setDeepSleep(0)
the STM32 goes into SLEEP mode (via__WFI
) when it's not doing anything - all peripherals are still powered on.setDeepSleep(1)
the STM32 goes into STOP mode when it's not doing anything - the high speed oscillator is off, as are most peripherals. It would be the default, but having it on means USARTs/etc won't work.