Skip to main content
Visitor II
October 7, 2024
Question

STM32H523RCT6 LSE TO LSI SHIFT

  • October 7, 2024
  • 1 reply
  • 556 views

Hi ST Team,

                   Currently i am using STM32H523RCT6 mcu for one of my project. 
In this i am using internal RTC circuit for timing purposes. I am using external LSE crystal for RTC. My requirement is that When LSE crystal is not present in circuit then mcu shift the RTC clock source from LSE to LSI. Please provide me a sample code or routine how to check that LSE is present or not. if LSE not present then shift the RTC clock source from LSE to LSI.

 

Thanks with Regards,

DEEPAK

    This topic has been closed for replies.

    1 reply

    Super User
    October 7, 2024

    Wait a reasonable amount of time for LSOON to get set (5sec or so, see datasheet for LSE startup time). If it doesn't happen, then assume LSE is not present and use LSI instead.