Skip to main content
Visitor
July 21, 2026
Question

Issues with UART programming on custom board

  • July 21, 2026
  • 3 replies
  • 49 views

I have two STM32G474 on a custom PCB, in which I want to use a SOM to program the microcontrollers via UART (USART1 or USART2).

While most PCBs work fine (toggle BOOT0 + NRST and program via UART), some PCBs have intermittent access on the UART. It is not always the same microcontroller that fails on the boards.

Tests I have done:

  • Programming via USB DFU always works, even when toggling BOOT0 and NRST with the SOM, so it seems it is going into bootloader mode correctly. In the SOM I am using stm32flash.
  • I have checked that no other signals are triggering the bootloader on another interface (e.g. I2C, other USART).
  • I have checked that the 0x7F command is being sent correctly (timing, clean edges, amplitude)
  • There is no reply at all from the micro
  • I have tested with pull-ups and/or series resistors on RX line and better decoupling on power supply, nothing made a difference
  • The same UART lines work fine during runtime, they only fail when in bootloader mode
  • The good PCBs are always good and the bad ones fail consistently (seems like it works sporadically but I can't see a pattern).
  • The same SOM can program the good boards but fails on the bad ones. So I have excluded the problem being (exclusively) the SOM.
     

Is there anything I am missing on the UART bootloader usage? Why would there be no reply from the micro during autobaudrate detection?

 

3 replies

Associate
July 21, 2026

This issue can be frustrating because the hardware works fine during application runtime and USB DFU works, which narrows the problem down specifically to the USART bootloader initialization phase inside the STM32's System Memory ROM code.

mƎALLEm
ST Technical Moderator
July 21, 2026

Hello ​@afernandes and welcome to the ST community,

What do you mean by “SOM”? the software or the host that you are using to program the STM32?

Same custom board + same MCU + Some boards are working/others not: seems to be an issue with the hardware and the board itself: example: soldering joint issue.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Visitor
July 21, 2026

Hi ​@mƎALLEm,
By SOM I mean the host I used to program the STM32.

The hardware on the "bad” boards is working since the UART works fine during runtime. 

mƎALLEm
ST Technical Moderator
July 21, 2026

By SOM I mean the host I used to program the STM32.

Try to avoid non-standard abbreviations so others can understand.

UART is working at runtime but what about the BOOT pin? need also to check also that hardware part.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
TDK
July 21, 2026

Is USB connected when you are trying this? What pins are you using? Show the hardware connections being used.

Generally, if some boards work and other board don’t, it’s a hardware problem with the board.

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