cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H523RCT6 LSE TO LSI SHIFT

DeepakKumar
Associate

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

1 REPLY 1
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".