Skip to main content
NRAML.1
Associate II
September 12, 2023
Solved

How to check HSE has stop

  • September 12, 2023
  • 3 replies
  • 1387 views

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?

This topic has been closed for replies.
Best answer by Foued_KH

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

3 replies

Foued_KH
Foued_KHBest answer
ST Employee
September 12, 2023

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
September 12, 2023

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""."
Tesla DeLorean
Guru
September 12, 2023

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..