cancel
Showing results for 
Search instead for 
Did you mean: 

Code execution stuck when LSI configured as clock source

Gaston
Senior

Hi,

If I configure the LSI as clock source my STM32C011F4U6TR code stuck at this point

Gaston_0-1721389123768.png

Gaston_2-1721388809122.png

However there is no problem if I configure HSISYS as clock source.

Gaston_1-1721388776386.png

Why? Could anyone help me with this issue?

Thanks in advance,
Gaston

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

With a 32 kHz clock rate, you don't have enough CPU resources to handle sys ticks occurring at 1 kHz. Increase clock speed, decrease the rate of systicks, or disable sys tick entirely, or rewrite systick not to use any cpu resources.

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

View solution in original post

1 REPLY 1
TDK
Guru

With a 32 kHz clock rate, you don't have enough CPU resources to handle sys ticks occurring at 1 kHz. Increase clock speed, decrease the rate of systicks, or disable sys tick entirely, or rewrite systick not to use any cpu resources.

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