Skip to main content
KMew
Senior III
March 3, 2023
Solved

STM32H7B3IIT6: Enter Standby Mode with PB11 and also Exit Standby Mode with PB11

Hello,

I am using the STM32H7B3IIT6 MCU to control a master control board, which has a push button connected to PB11 with the following hardware:

0693W00000aIAFGQA4.png 

My objective for this is the following:

  • When the system is running and I press this button, the MCU puts the entire system into standby (Sends stop signals to components, puts CAN and LCD display into standby, then puts the MCU into standby to minimize power consumption by the system's battery).
  • When the system is off and I press this same button, the MCU resets to a new "run" of the firmware and turns everything back on again.

According to another forum post I made, any pin connected to an EXTI line can be used to do this, so I selected PB11. However, I'm looking through the reference manual and they just refer to "wakeup pins" and don't define what they are or how to configure them as wake-up pins.

Can anyone please explain to me how to do the following steps:

  • Configure PB11 as a wakeup pin from standby mode
  • Send the MCU into Standby mode when the push button connected to PB11 is pushed
  • Exit the Standby mode when the push button connected to PB11 is pushed again

Thank you in advance.

This topic has been closed for replies.
Piranha
PiranhaBest answer
Principal III
March 6, 2023

As explained in the other topic, PB11 is not a wake-up pin. So choose one of the 6 wake-up pins available on your MCU. As for the code:

https://community.st.com/s/question/0D53W00001bnh8dSAA/how-to-enter-standby-or-shutdown-mode-on-stm32

Also I would recommend a hardware debounce circuit like for a B1 button (sheet 13) in this schematic.

2 replies

Piranha
PiranhaBest answer
Principal III
March 6, 2023

As explained in the other topic, PB11 is not a wake-up pin. So choose one of the 6 wake-up pins available on your MCU. As for the code:

https://community.st.com/s/question/0D53W00001bnh8dSAA/how-to-enter-standby-or-shutdown-mode-on-stm32

Also I would recommend a hardware debounce circuit like for a B1 button (sheet 13) in this schematic.

KMew
KMewAuthor
Senior III
March 7, 2023

Hello Piranha,

Thank you so much for this comprehensive explanation!

I did what you implemented and it worked perfectly.

I did forget the 100nF capacitor in my design, so I have implemented that into my design as well. I will keep an eye on the signal for any debouncing.