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-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-18 05:20 AM
> When the power supply is off, the RTC does not hold and run correctly,
How do you know?
JW
2024-06-18 05:54 AM
We are encountering issues with live date and time printing on our ODM development board using the attached circuit. Below are the details of the tests conducted:
Set Date and Time: 15/Jun/2024, 4:25 PM
Live Date and Time: 15/Jun/2024, 4:25 PM
Printed Date and Time: 15/Jun/2024, 4:25 PM
After running for 5 minutes:
The power was turned off on the DB, and after 5 minutes, we turned it back on. The system then printed the date and time as it was when the power was turned off, continuing from that point.
Set Date and Time: 15/Jun/2024, 4:25 PM
Live Date and Time: 15/Jun/2024, 4:40 PM
Printed Date and Time: 15/Jun/2024, 4:40 PM
After 5 minutes of power being off:
We conducted this test 4-6 times with consistent results. It seems that the printed date and time do not update correctly after power restoration.
Please check the attached circuit and provide guidance on potential issues and corrections needed.
2024-06-18 06:05 AM
No files are attached so I don't know what you did wrong.
You can check out this topic which might contain the solution that works for you:
https://community.st.com/t5/stm32-mcus-products/stm32h5-rtc-count-through-power-cycles/m-p/671611#M243435
You need to enable LSE instead of the internal clock.
2024-06-18 07:58 AM
Please check one more time
2024-06-18 09:37 AM - edited 2024-06-27 12:55 AM
R5 is discharging the battery to GND with 15mA. That's a lot and I don't see a need for discharging a backup battery.
RJ1 is also discharging the battery by having the battery supply current to the entire circuit, it also prevents the circuit from powering off. Internally VBAT is bypassed when VCC is present, so you do not need VCC connected to VBAT at all. Remove these resistors. You don't need the diode, it just ads voltage drop. C14 is redundant because of C55 and it is behind a diode, you only need one, look at the guidelines for what capacitor value is recommended. Extra components potentially add a small leakage current.
Have you checked LSE like I told you? If you use LSE as a clock source it won't run when powered by VBAT so the value will freeze like you observed. Additionally you will see very inaccurate time keeping.Have you checked the crystal to see if it is oscillating?
2024-06-19 10:12 PM - edited 2024-06-19 10:50 PM
I have checked the issue as per our previous conversation, but the same problem is still occurring. I am unable to trace the cause.
As per your instructions, I have made the following changes:
Despite these changes, the main problem persists, and I am unable to track down the root cause. Could there be a software issue, driver problem, or something related to the crystal that needs to be enabled? If there are any other hardware or software requirements, I will discuss them with the software team.
Please share the protocols for VBAT setup for both hardware and software, and any relevant references.
2024-06-19 10:49 PM
Please upload your .ioc-file so we can check your configuration.
2024-06-20 02:43 AM - edited 2024-06-20 02:44 AM
2024-06-21 09:48 PM
Waiting For your Respond