2021-11-19 08:40 PM
With STm32F429ZIT6 the RTC battery used is 3.6V Ni-Cd and the RTC crystal used is 32.768khz. Initially, it works well for some days but after 1-2 months RTC date and time get reset to default value every time system is power reset.
Need help to resolve this ASAP.
Thanks in adcvance.
Solved! Go to Solution.
2021-11-25 11:04 PM
2021-11-19 10:44 PM
Did you test the voltage of the Ni-Cd battery?
2021-11-19 11:19 PM
yes the voltage was 3.5 to 3.4 volts
2021-11-20 12:04 AM
Hi. if you are sure that backup power is never lost, you MUST try to catch an unexpected sw behavior.
For example some cube mx version code generated put a 'magic' number in the first word of RTC backup.after setting time. At startup if magic word is no more present ,RTC would be initialized.
Few years ago we catch this after Cube MX /HAL upgrade.
Nor cube MX or HAL release note alert us that 1st RtC backup register is used for internal purpose...
Perhaps you use RTC backup register or sometimes unexpected write to it...
2021-11-20 06:15 AM
If it works for a few months, then stops working, sure seems like that is consistent with the battery losing voltage. Code doesn't execute differently after 1-2 months.
Note that if a battery is loaded, then you remove the load, the battery will recover some voltage and may appear as if it's fine, even though it's low and the voltage will drop when the load is reapplied.
2021-11-20 06:29 AM
Yes 3.4V is very discharged NiCd
2021-11-21 07:52 PM
I tried replacing the battery but still, the problem persists. but if I replace the mico controller with a new one then the problem is solved. But that is not the required solution.
2021-11-21 11:16 PM
Also, what is the recommended battery for RTC of STM32F429?
2021-11-22 07:43 AM
If replacing the micro fixes it, the microcontroller is probably damaged. Keep in mind the max voltage you can put into VBAT and make sure you're under it at all times.
Any battery that has the proper voltage output range will work, such as a CR2032. NiCd batteries are very old/poor technology and aren't used much anymore.
2021-11-22 07:41 PM
@TDK which battery do you recommend for this uC? Does LIR2032 work?