From 3f95d3d2e3d32f7a3a820f8c0c26e9f48b983fa7 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 24 Feb 2020 19:25:08 +0100 Subject: [PATCH] cpu/saml21: pm: set deep flag Set the deep flag for consistency with other family members. --- cpu/saml21/periph/pm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpu/saml21/periph/pm.c b/cpu/saml21/periph/pm.c index 4d390a8d23..107c520f1a 100644 --- a/cpu/saml21/periph/pm.c +++ b/cpu/saml21/periph/pm.c @@ -26,16 +26,19 @@ void pm_set(unsigned mode) { + int deep = 0; uint32_t _mode; switch (mode) { case 0: DEBUG_PUTS("pm_set(): setting BACKUP mode."); _mode = PM_SLEEPCFG_SLEEPMODE_BACKUP; + deep = 1; break; case 1: DEBUG_PUTS("pm_set(): setting STANDBY mode."); _mode = PM_SLEEPCFG_SLEEPMODE_STANDBY; + deep = 1; break; default: /* Falls through */ case 2: @@ -53,5 +56,5 @@ void pm_set(unsigned mode) /* make sure value has been set */ while (PM->SLEEPCFG.bit.SLEEPMODE != _mode) {} - sam0_cortexm_sleep(0); + sam0_cortexm_sleep(deep); }