Skip to content

Commit

Permalink
Fix #132: Configure Sleep mode to 'StopWithLowPowerRegulator'.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Apr 8, 2019
1 parent e42f9a6 commit 69ced18
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lib/stm32/stm32l0/CatenaStm32L0_Sleep.cpp
Original file line number Diff line number Diff line change
@@ -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 */

/*
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 69ced18

Please sign in to comment.