Skip to main content
Visitor II
December 15, 2023
Solved

STM32U575 RTC is not retained even the VBAT pin is connected with coind battery

  • December 15, 2023
  • 2 replies
  • 1652 views

I want to use the internal RTC on the STM32U575 to maintain the date and time for an embedded application even when the main power supply is off. The VBAT pin of this chip is connected to a coin battery. However, I have observed that every time the main power is restored, the RTC resets itself and all the time and data information is cleared to default.

This behavior is not desirable. The reference manual, RM0456, does not mention this issue in the RTC section. I am wondering if anyone in our community has experienced a similar situation.

I have noticed discussions about a similar topic on other microcontrollers, but the solutions provided may not be applicable to the U5 chip.

Thank you in advance.

    This topic has been closed for replies.
    Best answer by Peter BENSCH

    Yes, it is a bit irritating because resetting the RTC to a defined value is presumably inserted for debugging purposes. Unfortunately, it is currently somewhat inconvenient to cancel the default setting, but I made a suggestion for a workaround here in the community some time ago.

    2 replies

    Technical Moderator
    December 15, 2023

    Well, the RTC does not reset itself, a programme is required for this. Unfortunately, you have not specified how you programmed the RTC?
    Regards
    /Peter

    hguanAuthor
    Visitor II
    December 15, 2023

    Thank you, Peter, I understand now.

    I need to modify the RTC initialization call that was generated by CubeMX for me. Currently, every time the power is turned on, the generated initialization routine automatically resets the RTC, causing it to appear as if it has been reset.

    I made a mistake in my thinking. I truly appreciate your assistance.

    Technical Moderator
    December 15, 2023

    Yes, it is a bit irritating because resetting the RTC to a defined value is presumably inserted for debugging purposes. Unfortunately, it is currently somewhat inconvenient to cancel the default setting, but I made a suggestion for a workaround here in the community some time ago.