2012-07-02 06:20 AM
I am using STM32 Microcontroller in my product. I am using 32.768 KHz as RTC Crsytal. At the Tamper/RTC pin (pin 2) ideally i should get 512 Hz for calibration . But i am getting 976 Hz so instead of 1 sec update i am getting 2 sec update ? What is the cause of this issue
2012-07-02 07:18 AM
What is the cause of this issue
That you are routing the 8 MHz HSE thru the /128 and /64 paths. (976.5625 Hz)2012-07-03 06:38 AM
I have done some experiments.I am not able to cause of 2 sec update.At RTC / Tamper pin i am getting 976 Hz signal which is HSE/128 and then divide by 64 . In this case my external 32.768 Khz crystal is not oscillating.But when i put my RTC battery out and again put in the circuit the RTC section works well and there is now 1 sec update and RTC/Tamper pin i am getting 512 Hz signal. Why now it starts working well (Reset in oscillator circuit inside uC) ? Any person who knows the cause ? Clive do you know the cause.
2012-07-03 07:50 AM
It's a well known issue about the RTC oscillator being critical to the crystal and couple capacitance at its terminals: sometimes it does not start. The behaviour is also temperature dependent: the lower the ambient temperature the worse the RTC start-up.
Programming the RTC register, pay attention to the back-up domain access rules: some bits must be set before (see manuals). In my device I solved the issue with the unreliable RTC start-up as follows: 1). try to switch the RTC LSE on. 2). wait for the LSE on for about 50ms. 3). if not successfull, switch to the LSI (setting properly the divider for LSI of about 40kHz) and go to the main program. Out of the main program a process tries to restart the LSE again (steps 1-2). If the RTC is battery supplied (my case, too), the LSE stays stable once started.2012-07-03 08:00 AM
I'm not sure exactly what part you're using, but I'll guess that you aren't setting the RTC properly, or enabling/unlocking the PWR/BKP.
What does you RTC initialization code look like? The PWR/BKP domain needs to be unlocked before you can start the LSE2013-12-15 07:43 AM
I am using STM32 Microcontroller in my product. I am using 32.768 KHz as RTC Crsytal. At the Tamper/RTC pin (pin 2) ideally i should get 512 Hz for calibration . But i am getting 976 Hz so instead of 1 sec update i am getting 2 sec update ? What is the cause of this issue