embello

Embedded software from JeeLabs

Embello Home Page
Hardware Documentation
Forth Library Documentation

Low-power sleep

Provide access to the low-power timer for low-power sleeping (stop mode).

API

: lptim-init ( -- )  \ enable the low-power timer
: lptim? ( -- )  \ dump the low-power timer registers
: stop100ms ( -- )  \ sleep in low-power for 100 ms
: stop1s    ( -- )  \ sleep in low-power for 1 sec
: stop10s   ( -- )  \ sleep in low-power for 10 sec
: wfe ( -- )  \ WFE Opcode, enters sleep mode

Examples

lptim-init
stop100ms
: lp-blink ( -- )  only-msi  begin  stop1s led iox!  again ;
lptim-init lp-blink