Question
Issues with UART programming on custom board
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?
