2025-07-20 11:03 PM - last edited on 2025-07-21 1:28 AM by Andrew Neil
I am experiencing issues with the VBAT pin on the STM32H753ZI Nucleo board. Specifically, the VBAT pin is not responding properly. I am using a CR2032 CMOS battery for RTC backup, but it is not maintaining the date and time as expected. When the power supply is off, the RTC does not hold and run correctly, but it resumes running once the power supply is restored. battery positive connected to VBAT and negative to GND. i have removed SB52.
I have attached the IOC and main file for your reference.
2025-07-21 6:40 AM
> When the power supply is off, the RTC does not hold and run correctly, but it resumes running once the power supply is restored.
What does this mean exactly? Does RTC reset to 1.1.2000, revert to some other particular date, or does it continue but the clock is late? How do you observe that?
JW
2025-07-21 7:54 AM
Hello,
I think you are using the internal oscillator?
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI;
RCC_OscInitStruct.HSIState = RCC_HSI_DIV1;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
I'm not sure this is part of the battery backed domain? I seem to remember reading that its only the Low Speed External that is part of the battery domain on some micro's.
Edit: see https://community.st.com/t5/stm32-mcus-products/rtc-and-lsi-in-vbat-operation/td-p/516998
If this is the case, then the clock would only probably advance once main power is on, but keep its value according to the battery backup?
Cheers.
2025-07-21 7:56 AM - edited 2025-07-21 7:57 AM
> I think you are using the internal oscillator? [LSI]
> I'm not sure this is part of the battery backed domain?
Good catch. It is not.
JW
2025-07-21 8:06 AM
One more thing to add...
in my experience using the LSI is terrible to accurately drive the RTC due to frequency inaccuracy etc. Much better to have a better external oscillator anyway.
Cheers.