cancel
Showing results for 
Search instead for 
Did you mean: 

How to check HSE has stop

NRAML.1
Associate II

I am using STM32H7A3/7B3 to my project.

Currently I use HSE as for the system clock.

There is a process when press power OFF MCU will go to STOP mode.

My question how to check that HSE has stop and enter the STOP mode correctly?

1 ACCEPTED SOLUTION

Accepted Solutions
Foued_KH
ST Employee

Hello @NRAML.1 , 

In Stop mode, all clocks are stopped, the PLLs, the HSI and the HSE RC oscillators are disabled.

To check if the HSE is disabled in STOP mode , you can check this flag : Bit 16 HSEON (RCC_CR): HSE clock enable
Cleared by hardware to stop the HSE when entering Stop or Standby mode.
0: HSE is OFF (default after reset)
1: HSE is ON

Foued

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

3 REPLIES 3
Foued_KH
ST Employee

Hello @NRAML.1 , 

In Stop mode, all clocks are stopped, the PLLs, the HSI and the HSE RC oscillators are disabled.

To check if the HSE is disabled in STOP mode , you can check this flag : Bit 16 HSEON (RCC_CR): HSE clock enable
Cleared by hardware to stop the HSE when entering Stop or Standby mode.
0: HSE is OFF (default after reset)
1: HSE is ON

Foued

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.

TDK
Guru

More generally, I would check the current consumption to verify STOP mode is working as expected.

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

In other situations you'd transfer the system to another running clock, presumably not the HSE and not the PLL, and then turn those off.

You shouldn't need to wait for them to turn off, but as @TDK indicates the best way to check you've achieved minimum power is to have a measure of it. Standby is how you achieve real savings, and but not powering GPIO's with loads on them.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..