circuitpython/ports/samd/mcu/samd51
robert-hh 03075a6839 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.
2022-10-25 23:07:27 +11:00
..
clock_config.c samd/modmachine: Implement machine.lightsleep(). 2022-10-25 23:07:27 +11:00
mpconfigmcu.h samd/mcu/samd51: Enable FAT support for SAMD51. 2022-10-25 23:07:23 +11:00
mpconfigmcu.mk samd/mcu/samd51: Enable FAT support for SAMD51. 2022-10-25 23:07:23 +11:00
pin-af-table.csv samd/pin_af: Simplify the pin-af-table handling. 2022-10-06 23:05:46 +11:00