2014-11-24 06:13 AM
Hi,
I'm using STM32l151rbt6 MCU. But after few days of running the program the internal RTC starts lagging. I'm not doing RTC calibration. Any other possible reasons?Thanks. #stm32 #rtc2014-11-24 06:27 AM
Exactly how much?
What is your crystal (brand, product number) and the loading capacitors? JW2014-12-05 02:38 AM
Hi,
Thanks for the reply. I never noticed the lag in the room temperature. And i don't know the exact amount of lag, When i installed my logger in the Site where the temperature varies 16 - 40C. When i see the logger after 6 months some of them lags one day and some of them lags 1 month. The component details are as follows. Please suggest me if calibration of crystal frequency is needed or any other possible solution.Component value Make Part NO. crystal 32.768KHz citizen finetech miyota CM130-32.768KDZF-UT Capacitor 18pF 250V Murata electronics GRM21A5C2E180JW01D5% NPO
2014-12-05 03:01 AM
The crystal has a load capacitance of 12.5pF so assuming you have 18pf on both ends and allowing for parasitic capacitance that looks about right. The frequency is designed for 25C and will change at higher and lower temperatures (temperature coefficient) but not by as much as you're seeing!
Either your oscillator is sometimes stopping then restarting or it's sometimes running very slow. I expect power supply or PCB problems to be the cause. Are your PCBs washed? Contamination often sits under surface mount packages. Alternatively are they conformally coated? Do you have condensation on the PCBs sometimes?2014-12-05 03:41 AM
Hi,
There is no contamination on PCBs as i noticed, and PCBs are not conformally coated. Is there any other accurate way of testing the stability of RTC?2014-12-05 03:46 AM
Also I'm using standby mode(when main power fails the it will be switched to 3V backup power) and stop mode when there is no tasks to do.
2014-12-05 04:06 AM
Are you sure you run the RTC from LSE and not from LSI? What is the content of RCC_CSR?
JW2014-12-05 05:48 AM
Several of the STM32 family allow you to measure the LSI/LSE against a timer, which can be clocked by an accurate HSE (crystal or source). You should also be able to push several internal clocks out via the MCO (PA8) pin. Pretty sure the L1 series gives you access to LSI and LSE
2014-12-10 04:43 AM
2014-12-10 05:33 AM
Hi Clive,
I measured LSE via MCO pin. It was 32.75 to 32.89KHz. I think it's fine. What do you say?