Skip to main content
Visitor
October 15, 2026
Question

STM32G031K8 how to setup BOOT pin?

The MCU STM32G031K8T6 has the BOOT pin is in the same pin as the SYS_SWDIO.

 

Should I just disregard the BOOT pin and allocate the function to SYS_SWDIO?

 

I am not sure what is the function from the BOOT pin... the internet says:

  • “Flash Memory Boot (Normal Operation): When the BOOT pin is pulled low (to ground), the microcontroller boots from its internal main flash memory, running the primary user application. [1, 2]
  • System Memory Boot (Firmware Updates / ISP): When the BOOT pin is pulled high (to VCC), the chip bypasses user flash and boots into a factory-installed, read-only bootloader in system memory. This allows you to program or update the chip's firmware via serial interfaces like UART, USB, SPI, or I2C without needing an external hardware programmer. [1, 2]”

 

The Nucleo (Nucleo NUCLEO-G031K8 Eval Kit) schematic for the G03 MCU does uses SYS_SDIO (the T_JTCK),and depopulates the pull down resistor from BOOT.

Will my board NOT run my code automatically UNLESS I pull that resistor down?

 

3 replies

TDK
October 15, 2026

On this chip, the level of the BOOT pin is ignored by default and user flash will start, unless the flash is empty in which case the bootloader will start.

There are a lot of different chips with different behaviors for the BOOT pin. You can view AN2606 to see what it takes to get into the bootloader. That behavior can be changed with option byte settings. See the reference manual for how the nBOOT_SEL and related option bits behave.

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

 

Visitor
October 15, 2026