cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Boot mode Pin functionality

abhijith_raj
Associate III

Hi,

I’m currently working with the STM32G491RE MCU and have encountered an issue related to GPIO pin PB6.

In our normal user application, PB6 is configured as a push-pull output. However, we would like to understand its behavior when the device enters boot mode.

The AN2606 document outlines the functionality of certain pins during boot mode, but PB6 is not clearly mentioned. We’d like to confirm whether PB6 takes on any alternate function or state during boot mode, or if it remains unaffected.

 

3 REPLIES 3
TDK
Super User

Pins not mentioned in AN2606 should not be modified. They'll be at their reset setting, typically analog mode or input mode depending on the chip.

If it is critical to your application, I would double check. Put it in bootloader mode, then connect over SWD using STM32CubeProgrammer and examine the state of GPIOB registers. Or monitor on a scope.

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

Hi @TDK 
Our current setup is as follows: PB6 is configured as an output pin and is set high to supply power to another device. The boot and reset lines of our system are controlled externally by this other device, which also handles firmware flashing. During this flashing process, it is essential that PB6 remains in a high state.
To ensure this, the hardware team added a pull-up resistor to PB6. However, after some testing, they’ve observed that PB6 might be disabled or left floating when the system enters bootloader mode, which could be causing issues.

> The boot and reset lines of our system are controlled externally by this other device

> PB6 might be disabled or left floating when the system enters bootloader mode

If you enter the bootloader by holding BOOT0 high and resetting, PB6 should be floating. If there's a pullup, it should get pulled up. That is the expected behavior. Is that what you are seeing?

If not, show pictures of what you see both (a) under reset and (b) after entering bootloader.

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