cancel
Showing results for 
Search instead for 
Did you mean: 

RTC clock source issues

rwemyss
Associate
Posted on December 25, 2008 at 01:07

RTC clock source issues

3 REPLIES 3
rwemyss
Associate
Posted on May 17, 2011 at 12:54

Hey!

I'm having some problems with the RTC on the STM32. When I use the LSE everything works as desired, but when I try to use the HSE or LSI it only works until there's a reset then stops working.

I would expect it to work the same way for any of the clock sources. Any ideas why this is happening?

It seems to hang on RTC_WaitForSynchro();

I'm using a keil development board, the fwlib and basically a copy of the example given in the fwlib examples folder.

Thanks!

[ This message was edited by: rwemyss on 26-11-2008 18:56 ]

dschneeweis
Associate II
Posted on May 17, 2011 at 12:54

Hi

I have the same problem, when using the LSI as RTC source.

If I stop the debugger after I reseted the SEC-flag from the RTC and perform a reset with the debugger the LSEON bit is set automaticly and the LSE starts working. Now the RTC-source is choosen as LSI (because the input channel selector is in the backup-domain). The LSI itself is stopped with reset.

The command WaitForSynchro() needs at least on tick on the RTC. But without a clocksource it waits forever.

Why starts the LSE after clearing the SEC-flag and reset the CPU? If it wouldn't start I only had to check the LSEON bit and if not set and RTC is on start LSI.

pandoraems
Associate II
Posted on May 17, 2011 at 12:54

i am only starting with RTC stuff, but according to documentation only LSE can stay on during reset (or power off, while Vbatt is present)

other oscillators are not a part of RTC core and therefore aren't operational in the stand-by mode.

maybe thats the explanation to the behavior you observe?