2025-06-08 11:48 PM
Hi,
I'm working on a project using an STM32G series MCU alongside a processor. The processor runs an application that handles firmware flashing for the STM32.
We’re planning to implement firmware upgrades over I2C or UART. However, due to hardware limitations, the I2C line we selected does not support bootloader flashing. So, we're now considering UART for the firmware upgrade.
The current schematic only provides access to the MCU's RX pin—its TX pin is not connected. Can we connect the processor's TX pin to the MCU's RX pin and still perform the firmware upgrade using the STM32 bootloader? Will this unidirectional connection be enough?
2025-06-09 12:10 AM
The system boot UART protocol is inherently bidirectional. See AN3155 Application note and
How to utilize STM32 system (ROM) bootloader comma... - STMicroelectronics Community.
You may however implement your own custom bootloader in flash. This could use any interface you like.
If you must opt for that single UART pin, consider a 1 pin half-duplex protocol or the optional RX/TX pin swapping capability of many STM32 UARTs.
You may start your boot loader from scratch, check STMicroelectronics/stm32-mw-openbl: Provides the Open Bootloader library, part of the STM32Cube MCU Component "middleware", for all STM32xx series.
or 3rd party options.
KnarfB
2025-06-09 1:07 AM
Hello,
You need both Tx and Rx pins as there are commands from the host and acknowledge and responses from the STM32 using that Tx pin.