2024-06-18 03:01 AM - edited 2024-06-18 07:57 AM
I am experiencing issues with the VBAT pin on the STM32H563ZIT6 microcontroller. 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.
I have attached the circuit diagram for your reference. Could you please provide a clear explanation of the potential issues and offer guidance on how to resolve them? Expert advice on this matter would be greatly appreciated.
VBAT & CMOS :
Solved! Go to Solution.
2024-06-21 11:43 PM
Ok, but C14 should be there. (I use 10u cer.cap here.)
+
Set in Cube the LSE drive high !
Then it should work.
2024-06-22 12:46 AM - edited 2024-06-22 12:59 AM
As I suspected LSE is disabled. So your crystal will never oscillate.
And you don't use LSE as clock source either.
Drive strength depends on the MCU family and used crystal. Higher drive strength consumes more current. Too low and it may not oscillate.
Check Table 7. "Recommended crystal / MEMS resonators for the LSE oscillator in STM32"
from an2867-guidelines-for-oscillator-design-on-stm8afals-and-stm32-mcusmpus-stmicroelectronics.pdf for what your MCU supports.I've had issues with using a not supported crystal with too high capacitance. It resulted in some boards not booting sometimes since the LSE init function time out. The trick was using a different crystal with correctly calculated capacitors and set the right drive strength (in our case second highest level was good).
Check the datasheet of your MCU to see what drive strength levels are supported for LSEDRV.
"Table 43. Low-speed external user clock characteristic" in stm32h563zi.pdf
2024-06-27 12:18 AM
As per your instructions, the problem was solved. We checked it a few times, each for a duration of 5 to 10 minutes, over the last few days. If any issues occur in the future, I will call you back. Thank you for your support and guidance.
2024-06-27 12:56 AM
I'm glad you got it to work. Please kudo the posts that helped you.