cancel
Showing results for 
Search instead for 
Did you mean: 

Bad LSE precision

Kuikui
Associate III
Posted on April 02, 2011 at 19:53

Bad LSE precision

4 REPLIES 4
Posted on May 17, 2011 at 14:30

Something is decidedly wrong if a smaller prescaler (512->400) reduces the frequency (80->64 Hz). Although I haven't looked at the speed rating of the RTC ticker which nominal runs at 1 Hz.

I think this is the app note you were looking for

http://www.st.com/stonline/products/literature/an/15287.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Kuikui
Associate III
Posted on May 17, 2011 at 14:30

=> Something is decidedly wrong if a smaller prescaler (512->400) reduces the frequency (80->64 Hz).

Damn, I didn't notice,  you're right, something's wrong  .... I checked again, and this is really the behaviour I can observe  ...

donald2
Associate II
Posted on May 17, 2011 at 14:30

An 80Hz output instead of 64Hz sounds as if you are really using the Low Speed Internal 40KHz clock instead of the LSE clock.

The register that controls this, RCC_BDCR, is in the ''backup domain''.  It has special write and reset rules.  It's easy to conclude that your code has written it correctly, when the setting really came from a previous debugging session or code version.

Posted on May 17, 2011 at 14:30

I'd have to concur with Donald, my first thought was you'd have to be using the internal 40 KHz LSI, but if you're just changing the prescaler the numbers you are coming up with don't make sense.

I had my VL Discovery running with the 32.768 KHz external, prescaled by 512-1, ticking at 64 Hz, and toggling the LED under the RTC ''1 second'' ticker interrupt at 32 Hz. So not duplicating your observations here.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..