stm32duino / STM32LowPower

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

[document update request] RTC use NOT LSE BUT LSI clock source by default #99

Closed etakata closed 1 year ago

etakata commented 1 year ago

I guess that RTC used as Wakeup source will configure it to use NOT LSE clock source BUT LSI clock source, in the current implementation.

If we are using the HSE_CLOCK, this library forces to change the clock source to LSI_CLOCK. https://github.com/stm32duino/STM32LowPower/blob/35a49c42124757c71b4d69cef9b79708ca855ca3/src/STM32LowPower.cpp#L193 The clock source is not changed anything if we are using the LSI_CLOCK or LSE_CLOCK.

So, I'd like to suggest to change from: https://github.com/stm32duino/STM32LowPower/blob/35a49c42124757c71b4d69cef9b79708ca855ca3/README.md?plain=1#L54

to (for example):

RTC used as Wakeup source will configure it to use LSI clock source even if HSE clock source is selected.
The clock source is not changed anything if you are using the LSI or LSE clock source.