Skip to content

Using external 32k768 crystal as default clock source instead of the … #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants