cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 flashing via uart

abhijith_raj
Associate III

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?

2 REPLIES 2
KnarfB
Super User

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

mƎALLEm
ST Employee

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.

mALLEm_0-1749456415856.png

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.