cancel
Showing results for 
Search instead for 
Did you mean: 

Can two or more STM32s share UART lines if all but one are held in reset?

unicycle
Associate III

I have a board in which one STM32 (call it "central") is required to update the firmware on a number of others ("sensing"). It seems simplest to use the USART1 interface for the built-in bootloader on the sensing processors. I would like to multiplex a single UART on the central processor. My proposal is to use GPIOs to drive the sensing processor NRST pins. Re-programming would mean holding 7 of the STM32s in reset for however long it takes to flash the firmware through the bootloader. That way, only one processor will be active on the common UART lines.

Is this a reasonable approach? It seems simple, but I haven't tried it before and wondered about whether holding devices in reset for extended periods might cause damage (I think not), and also what is the state of the pins on the devices in reset (I've assumed they won't be an issue)?

Perhaps it would be better with some FETs or whatever to isolate the device being updated.

Thanks.

2 REPLIES 2

IMO it's a viable scenario. You'll need to handle BOOT0, too.

> whether holding devices in reset for extended periods

>might cause damage

By no means.

> what is the state of the pins on the devices in reset

See GPIO chapter in RM.

JW

unicycle
Associate III

Thanks for the reply. After a discussion, we have decided to use multiplexers for TX, RX and NRST to target only one of the "sensing" devices at a time. It looks like simply splitting BOOT0 eight ways to affect all devices at the same time is sufficient since BOOT0 (and BOOT1) are only read just after reset.