2022-07-26 05:39 AM
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.
2022-08-17 05:43 AM
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.