cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use the same serial1 port to communicate with two modules?

maryam magdy
Associate II

My MCU is stm32L432kc, it has two serial ports 1 and 2. But I'm wondering if I can use the same serial port1 only to communicate with two modules (not on the same Tx & Rx pins but 4 different pins) ?

Is there anyway I can in the software communicate with one module then disable the communication and communicate with the other?

I tried connecting both but one of them never works unless I remove the Serial definition of the other.

I attached a pic of my MCU with pins functions described

1 REPLY 1
AvaTar
Lead

The "normal" serial standard RS232 is a point-to-point connection, and does not allow more bus participants. You could consider RS422 or RS485.

Or, for very short distances, I2C or SPI.