UART and pin mux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART and pin mux

1,358 Views
Keith4DSmith
Contributor V

A UART consists of four pins TX, RX, CTS_b, and RTS_b.

Is it required that all pins of a UART be on the same port, or can any combination of pins be used?

Labels (1)
Tags (2)
1 Reply

1,176 Views
mjbcswitzerland
Specialist V

Keith

You can use any pins belonging to a UART. Eg. UART1_TX on PTB5 or PTE11, UART1_RX on PTB6, PTE12 or PTA17, UART1_RTS on PTB7 or PTE13 and UART1_CTS on PTB14 or PTA22 or PTD2 (ports examples illustrative and probably done match a physical device).

What you can't do is use UART1_CTS and UART1_RTS with UART2_TX and UART2_RX (at least not in one of the automated modem modes).

Not all RTS and CTS pins are necessarily available (some UARTs or LPUARTs done have or support them) and RTS/CTS operation (RTS/CTS flow control and RS485 control) can usually be emulated with GPIOs in such cases if absolutely necessary.

Regards

Mark