stm32duino / STM32LowPower

Arduino Low Power library for STM32
183 stars 52 forks source link
lowpower stm32

STM32LowPower

Arduino library to support STM32 Low Power.

Requirement

API

[!Note] With STM32RTC version lower than 1.1.0, the minimum number of milliseconds is 1000 ms.**

Begin() function must be called at least once before idle(), sleep(), deepSleep() or shutdown() functions.

attachInterruptWakeup() or enableWakeupFrom() functions should be called before idle(), sleep(), deepSleep() or shutdown() functions.

[!Important]

  • HardwareSerial used as Wakeup source will configure it to use HSI clock source even if another peripheral clock is configured.

  • RTC used as Wakeup source requires to have LSE or LSI as clock source. If one of them is used nothing is changed else it will configure it to use LSI clock source. One exception exists when SHUTDOWN_MODE is requested and PWR_CR1_LPMS is defined, in that case LSE is required. So, if the board does not have LSE, it will fail.

  • The board will restart when exit shutdown mode.

Hardware state

Source

You can find the source files at
https://github.com/stm32duino/STM32LowPower