cancel
Showing results for 
Search instead for 
Did you mean: 

UART/USART - enable HDSEL and SWAP at the same time?

evan2
Associate II

Hi All,

Could anyone tell me what happens on an STM32H750 (or other STM32) UART if you enable both the HDSEL bit (half-duplex mode using only the TX pin) and the SWAP bit (switch TX and RX pins) at the same time? Will this get me a half-duplex UART using on the RX pin, or is the hardware not flexible enough to do that?

The specific goal here is to get two bidirectional UARTs on pins 92 and 93 on an LQFP100 STM32H750. If this works, then I can make pin 92 LPUART1 TX/RX by enabling HDSEL, and I can make pin 93 USART1 TX/RX by enabling both HDSEL and SWAP.

Thank you

10 REPLIES 10

Piranha - yes, the wider choice is definitely nice, especially with some of ST's pin mappings. On the H750 pin 92 is USART1_TX and LPUART1_TX, and pin 93 is USART1_RX and LPUART1_RX. With this I can make pin 92 into a TX/RX for USART1 and pin 93 into TX/RX for LPUART1, whereas otherwise I'd have to either disable one UART or lose one USB port.