Showing results for 
Search instead for 
Did you mean: 

Why STM8CubeMX prohibits using the LSI for STM8L152R6Tx?

Vyacheslav Azarov
Associate III
Posted on July 11, 2018 at 17:34

Hello everyone,

Why does the STM8CubeMX prohibit the clocking of the RTC with a frequency of less than 1 MHz, not allowing to use of an LSE? I want made a watch!

Thanks in advance.

#lsi #rtc #stm8cubemx #clock-configuration
Senior III
Posted on July 11, 2018 at 17:51

Dear Vyacheslav,

In title of this thread you mention LSI, while in content you refer to LSE, so it is not fully clear to me which of these clock sources is a subject of your question.

Anyway I created a new STM8CubeMX project for STM8L152R6Tx and I am able to select both LSE and LSI as a source of clock, that feeds RTC. Please see below:


In order to be able to select LSE one thing in advance has to be done. In Pinout tab LSE has to be enabled (in RCC item):




Posted on July 11, 2018 at 18:20

Dear Szymon, You understood correctly. I'm using Linux version 1.2.0, here is a screenshot.


Perhaps this is just a mistake in the program and to the restriction it has nothing to do. In version 1.3.0, the same limitation. What do you think?

Thank you.

Posted on July 11, 2018 at 19:19

In the newly created project in v1.3.0 , this restriction is absent.

Senior III
Posted on July 12, 2018 at 09:25

Thank you for clarification. It looks like a bug in the program. I am sorry for it, as I can imagine that it was confusing to you. I am sure you can use LSE to feed RTC and expected frequency of LSE is 32.768kHz. Definitely not 1..16MHz. As a confirmation of this information please find an extracted part from datasheet below:

0690X0000060M8OQAU.pngI will take an action and report it to the team responsible for maintenance of STM8CubeMX. Before doing it, could you please let me know if you discovered any other problems with STM8CubeMX running on the Linux OS?



Posted on July 12, 2018 at 16:24

Thanks for the help. I will certainly inform you in case of principle problems.