1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00
RIOT/cpu/samd21
Benjamin Valentin 91604d0217 cpu/samd21: clean up 'disabled GCLK' magic
It turns out hooking up an unused peripheral to a disabled GCLK
leads to surprising power savings.

Name the GCLK to be more explicit (and since not all members of
the extended samd2x family have a GCLK7).

Turns out we can just use a non-existing GCLK ID for this, this
even saves us a real GCLK that we can use for something else.

Also make sure to disable *all* peripherals by using
`GCLK_CLKCTRL_ID_Msk` instead of relying on a magic value.

Looks like we previously missed some, since this leads to some
additional power savings:

master:     4.22 mA
this patch: 4.09 mA
2020-10-02 23:16:52 +02:00
..
include cpu/samd21: clean up 'disabled GCLK' magic 2020-10-02 23:16:52 +02:00
periph cpu/sam0_common: move PWM to common code 2020-06-07 16:50:17 +02:00
cpu.c cpu/samd21: clean up 'disabled GCLK' magic 2020-10-02 23:16:52 +02:00
doc.txt cpu/sam0: add missing doxygen group definition + cleanup 2017-08-24 14:54:47 +02:00
Kconfig cpu/cortexm_common: advertise puf_sram feature 2020-09-11 16:30:45 +02:00
Kconfig.samd21 cpu/samd21: add all parts to Kconfig 2020-08-24 16:11:48 +02:00
Kconfig.samr21 cpu/samd21: add all parts to Kconfig 2020-08-24 16:11:48 +02:00
Makefile cpu/sam0: renamed sam21_common to sam0_common 2016-12-15 11:47:03 +01:00
Makefile.dep cpu/sam0_common/periph/uart: implement buffered write 2019-11-27 19:01:00 +01:00
Makefile.features cpu/cortexm_common: advertise puf_sram feature 2020-09-11 16:30:45 +02:00
Makefile.include cpu/samd21: define CPU_COMMON_SAMD21 symbol and use it 2020-08-24 16:13:18 +02:00
vectors.c cpu/cortexm: Remove leftover _estack declarations 2017-11-10 15:38:14 +01:00