Skip to main content
Associate
June 22, 2025
Solved

STM32 BOOT0 not working

  • June 22, 2025
  • 2 replies
  • 788 views

I have designed a board using the STM32U083KCU, i have programmed it once with a simple program made with STM32CubeIde that only prints "Hello\n" over USART2 on pins PA2 and PA3. I have flashed the chip over the same pins by holding the BOOT0 Pin high and power cycling it. It flashed it when it was blank. Now i tried to flash the full Program i wanted to upload and tried to upload it over the same method, using STM32CubeProg over UART2 on pins PA2 and PA3. I have held BOOT0 high. But it didn't flash, it said the Device is KO. I tried lowering the baud rates but this didn't help. I have tried to program it using SWD with a STM32Nucleo as the programmer. But the SWD doesn't connect to the chip. The STM works as it sends the "Hello\n" message to the computer if BOOT0 is low but for some reason also when BOOT0 is High. Is there a possibility to rescue the MCU ?

 

Thank you for your time (:

Best answer by TDK

SWD should work, as long as your program isn't accessing low power modes or erasing flash. Need GND/SWDIO/SWCLK connected. If it's not working, probably an issue in wiring.

Chip orientation looks right. Scraping traces to solder wires does not inspire confidence but looks like it may be okay. The need to be connected to a programmer, correctly, which isn't shown in the photo.

 

On the next board, you can change option bytes such that BOOT0 pin isn't ignored before the first program to avoid this.

2 replies

Tesla DeLorean
Guru
June 22, 2025

If you connect the NRST/NRESET pin to the ST-LINK the "Connect Under Reset" becomes an option with STM32 Cube Programmer.

Attempt connection, and when you achieve that, you can Mass Erase the part to get the problem code off of it.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
PolonezAuthor
Associate
June 23, 2025

I have connected the NRST to the STM32 and the stlink, in the STM32CubeProhrammer i have used Connection Under reset and Hardware Reset. It sais no STM32 Target found

TDK
Super User
June 23, 2025

BOOT0 pin is ignored on this chip by default. Connecting with SWD should work. Share schematic, show pictures of setup when trying to connect with SWD.

"If you feel a post has answered your question, please click ""Accept as Solution""."
PolonezAuthor
Associate
June 23, 2025

This is the mcu part of the schematic and my board setup, i initially didn't intend to use SWD, so i only made short traces to scrape if i really need access. I have measured the connections with a continuity tester and it seems to be connected to the Chip.

TDK
TDKBest answer
Super User
June 23, 2025

SWD should work, as long as your program isn't accessing low power modes or erasing flash. Need GND/SWDIO/SWCLK connected. If it's not working, probably an issue in wiring.

Chip orientation looks right. Scraping traces to solder wires does not inspire confidence but looks like it may be okay. The need to be connected to a programmer, correctly, which isn't shown in the photo.

 

On the next board, you can change option bytes such that BOOT0 pin isn't ignored before the first program to avoid this.

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