Skip to content

Conversation

LieBtrau
Copy link

…inaccurate internal RC oscillator.

Signed-off-by: Christoph Tack prog.send@gmail.com

…inaccurate internal RC oscillator. Signed-off-by: Christoph Tack <prog.send@gmail.com>
@fpistm
Copy link
Member

fpistm commented Aug 11, 2018

Hi @LieBtrau
Even if the LSI is inaccurate, it has been chosen because not all boards have an LSE.
If your board has an LSE, simply set it before call begin:

rtc.setClockSource(STM32RTC::RTC_LSE_CLOCK);

@LieBtrau
Copy link
Author

Hi Frederic,
I learned the hard way that I first have to select the right clock source.
Yesterday I used the "SimpleRTC" example, where that line is not present. If it had been there, selecting either LSE or LSI, I would have realized much sooner that the wrong clock source was the source of the big time deviation with respect to my PC.

I suggest adding that line to the SimpleRTC example. After all, the examples are there to help people who don't know the innards of the library.

@fpistm
Copy link
Member

fpistm commented Aug 11, 2018

I understand. Example could be updated to add this behaviour.

@fpistm fpistm closed this in b8cbccd Sep 20, 2018
@fpistm fpistm added this to the 1.02/1.1.0 milestone Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants