From 5b0e427a522e09e7eafca405eddb86e9f00f4611 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 27 Feb 2019 09:33:33 +0100 Subject: [PATCH] samd21: enable idle modes tested on samr21-xpro, UART and 802.15.4 still work as before, but current draw drops from 12mA to 8mA. --- cpu/samd21/include/periph_cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpu/samd21/include/periph_cpu.h b/cpu/samd21/include/periph_cpu.h index f05902506f..fa31cf5834 100644 --- a/cpu/samd21/include/periph_cpu.h +++ b/cpu/samd21/include/periph_cpu.h @@ -28,6 +28,12 @@ extern "C" { #endif +/** + * @brief Override the default initial PM blocker + * @todo Idle modes are enabled by default, deep sleep mode blocked + */ +#define PM_BLOCKER_INITIAL { .val_u32 = 0x00000001 } + /** * @brief Mapping of pins to EXTI lines, -1 means not EXTI possible */