Where is this set (jsiStatus & JSIS_ALLOW_DEEP_SLEEP)?
The setDeepSleep(true) function. It's great that you implemented deep sleep - and it wakes up properly on pin change events and if setTimeout/etc is used?
Generally it doesn't sleep if USB is connected (but I think the EFM32 doesn't have USB?) - and yes, since the clocks stop the Serial UART usually dies, and that makes the console almost unusable :) You can hack something up using some JS code and RTS and CTS if they exist though :)
There's a branch where I'm looking at adding software serial - I'm hopeful that (at least for low baud rates) that may be usable from deep sleep.
if I want to use 115200 baud for the console, how do I do it (on the PC side)?
In the Web IDE? It's under 'settings' and 'communications'.
On the Espruino itself you can do Serial1.setup(115200) which should work, but potentially you may have to re-specify the pins too: Serial1.setup(115200, {rx: ..., tx:...})
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.
The
setDeepSleep(true)
function. It's great that you implemented deep sleep - and it wakes up properly on pin change events and ifsetTimeout
/etc is used?Generally it doesn't sleep if USB is connected (but I think the EFM32 doesn't have USB?) - and yes, since the clocks stop the Serial UART usually dies, and that makes the console almost unusable :) You can hack something up using some JS code and
RTS
andCTS
if they exist though :)There's a branch where I'm looking at adding software serial - I'm hopeful that (at least for low baud rates) that may be usable from deep sleep.
In the Web IDE? It's under 'settings' and 'communications'.
On the Espruino itself you can do
Serial1.setup(115200)
which should work, but potentially you may have to re-specify the pins too:Serial1.setup(115200, {rx: ..., tx:...})