From 69ced183115a35dcf8ff2dfb2cc5f9064a2fce71 Mon Sep 17 00:00:00 2001 From: Dhinesh Kumar Pitchai Date: Tue, 9 Apr 2019 02:15:41 +0530 Subject: [PATCH] Fix #132: Configure Sleep mode to 'StopWithLowPowerRegulator'. --- src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp b/src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp index 39586b3..a64c4f1 100644 --- a/src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp +++ b/src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp @@ -1,4 +1,4 @@ -/* CatenaStm32L0_Sleep.cpp Wed Oct 31 2018 10:57:42 chwon */ +/* CatenaStm32L0_Sleep.cpp Mon Apr 08 2019 16:32:20 dhineshkumar */ /* @@ -8,10 +8,10 @@ Module: CatenaStm32L0_Sleep.cpp Home for CatenaStm32L0::Sleep() Version: - V0.11.0 Wed Oct 31 2018 10:57:42 chwon Edit level 1 + V0.11.1 Mon Apr 08 2019 16:32:20 dhineshkumar Edit level 2 Copyright notice: - This file copyright (C) 2018 by + This file copyright (C) 2018-2019 by MCCI Corporation 3520 Krums Corners Road @@ -29,6 +29,9 @@ Revision history: 0.11.0 Wed Oct 31 2018 10:57:42 chwon Module created. + 0.11.1 Mon Apr 08 2019 16:32:20 dhineshkumarr + Call SleepForAlarm with SleepMode StopWithLowPowerRegulator. + */ #ifdef ARDUINO_ARCH_STM32 @@ -96,7 +99,7 @@ Name: CatenaStm32L0::Sleep() void CatenaStm32L0::Sleep(uint32_t howLongInSeconds) { this->m_Rtc.SetAlarm(howLongInSeconds); - this->m_Rtc.SleepForAlarm(CatenaStm32L0Rtc::SleepMode::Standby); + this->m_Rtc.SleepForAlarm(CatenaStm32L0Rtc::SleepMode::StopWithLowPowerRegulator); // add the number of ms that we were asleep to the millisecond timer. // we don't need extreme accuracy.