cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L071 - Is explicit HSE disabling needed before entry to the Stop mode while system clock running from HSE?

MPrud.1
Associate

In the STM32L071 reference manual, there is following statement regarding STOP mode entry with HSE as a system clock:

"If the application needs to disable the external clock before entering Stop mode, the HSEON bit must be first disabled and the system clock switched to HSI16. Otherwise, if the HSEON bit is kept enabled while external clock (external oscillator) can be removed before entering Stop mode, the clock security system (CSS) feature must be enabled to detect any external oscillator failure and avoid a malfunction behavior when entering Stop mode."

Such statements looks like that firmware must explicitly switch to HSI before entering STOP mode. Can somebody confirm the understanding of the reference manual statement is correct? It sound little weird to explicitly switch to HSI before entering STOP mode.

1 REPLY 1
KDJEM.1
ST Employee

Hi @MPrud.1​ ,

To avoid a malfunction behavior, it must switch to HSI16 or enabled the clock security system (CSS) when entering Stop mode.

Also, if you refer to the RM0377 and precisely Section 6.3.1, you can conclude that: the system clock and all high-speed clocks are stopped in Stop mode except the HSI16 clock if HSI16KERON bit is set. When exiting the Stop mode, the internal MSI or HSI16 can be selected as system clock.

Kaouthar

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.