diff options
| author | robert-hh <robert@hammelrath.com> | 2022-08-01 17:23:11 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-10-25 23:07:27 +1100 |
| commit | 03075a68399a6450fd0e238dd75314805f8365b7 (patch) | |
| tree | 2f11dffb52d1584441ace5e0afe5954d569c4a78 /py/asmarm.h | |
| parent | 4c9e4c3310faff5ec05b183454df88d0f33f9e78 (diff) | |
samd/modmachine: Implement machine.lightsleep().
Which just sets the CPU clock to 200kHz and switches the peripheral clock
off. There are two modes:
machine.lightsleep(duration_ms)
and
machine.lightsleep()
In any mode any configured pin.irq() event will terminate the sleep.
Current consumption in lightsleep for some boards:
- 1.5 - 2.5 mA when supplied trough an active USB
(Seeed XIAO w/o power LED, Adafruit ItsyBitsy)
- 0.8 - 2 mA when supplied through Gnd/+5V (Vusb)
(Seeed XIAO w/o power LED, Adafruit ItsyBitsy)
- < 1 mA for SAMD51 when supplied trough a battery connector
(Sparkfun Thing SAMD51 plus)
Related change: move the calls to SysTick_Config() into set_cpu_freq(). It
is required after each CPU freq change to have ticks_ms run at the proper
rate.
Diffstat (limited to 'py/asmarm.h')
0 files changed, 0 insertions, 0 deletions
