stm32duino / STM32LowPower

Arduino Low Power library for STM32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

etakata opened this issue · comments

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.

clkSrc = (clkSrc == STM32RTC::HSE_CLOCK) ? STM32RTC::LSI_CLOCK : clkSrc;

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:

RTC used as Wakeup source will configure it to use LSE clock source even if another RTC clock source is selected.

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.