2011-04-02 10:53 AM
Bad LSE precision
2011-05-17 05:30 AM
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.pdf2011-05-17 05:30 AM
=> 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 ...2011-05-17 05:30 AM
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.2011-05-17 05:30 AM
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.