cancel
Showing results for 
Search instead for 
Did you mean: 

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

KMew
Senior III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Piranha
Chief II

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.

View solution in original post

2 REPLIES 2
Piranha
Chief II

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.

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.