summaryrefslogtreecommitdiff
path: root/py/bc.c
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2022-08-01 17:23:11 +0200
committerDamien George <damien@micropython.org>2022-10-25 23:07:27 +1100
commit03075a68399a6450fd0e238dd75314805f8365b7 (patch)
tree2f11dffb52d1584441ace5e0afe5954d569c4a78 /py/bc.c
parent4c9e4c3310faff5ec05b183454df88d0f33f9e78 (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/bc.c')
0 files changed, 0 insertions, 0 deletions