cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot make ADC example working with RTC when using LSE crystal source

migmel
Senior

Hello guys,

I have adapted this example from repository to work with a STM32L071CB:

STM32Cube\Repository\STM32Cube_FW_L0_V1.12.2\Projects\NUCLEO-L073RZ\Examples_LL\ADC\ADC_SingleConversion_TriggerSW_DMA

It works fine until I want to add RTC and select LSE as RTC clock source.

If I select LSI as clock source for RTC, it works fine.

I have a loop showing the converted data every second, but when selected LSE as clock source for RTC, it does not show any results.

I think it makes not sense to use LSI as clock source for RTC, so I am stuck in this point.

Any idea on what might be the problem?

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Well, you have to make sure that LSE works, of course.

Have you set the LSE to Crystal/Ceramic (assuming you are using a Crystal)?

You can also enable the Master Clock Output (MCO) and set the MCO Source Muxer to LSE, then the LSE frequency will be visible on the MCO pin if the LSE is working.

Feel free to share here the components used on the LSE, if possible also the layout section around the LSE. You can also check the latter yourself with AN2867, section 7.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

Well, you have to make sure that LSE works, of course.

Have you set the LSE to Crystal/Ceramic (assuming you are using a Crystal)?

You can also enable the Master Clock Output (MCO) and set the MCO Source Muxer to LSE, then the LSE frequency will be visible on the MCO pin if the LSE is working.

Feel free to share here the components used on the LSE, if possible also the layout section around the LSE. You can also check the latter yourself with AN2867, section 7.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
migmel
Senior

Thank you for your reply,

I think the LSE might be malfunctioning

I will do what you've suggested