Skip to main content
KAsim
Associate II
May 26, 2019
Question

STM32L412C8 USART2 RX TX pin swap not working

  • May 26, 2019
  • 17 replies
  • 3811 views

I am using the STM32L412C8 and I am having trouble with the USART2 RX/TX pin swapping. I enabled it in CubeMX but if I send data to the PA2 pin (originally TX but should be RX after the swap) I get nothing. If however I send my data to PA3(should be TX after the swap) data instantly comes in. Checking the CR2 register of the USART, the SWAP bit is set.

What am I doing wrong?

This topic has been closed for replies.

17 replies

DOsbo
Associate III
March 31, 2020

I have the same problem with an STM32F030RC.  The UART has been configured with the Swap bit enabled (verified), but I get nothing on the new Tx line.  Disabling the Swap bit allows data to be sent on the original Tx line. I'd like to know if anyone has got Tx/Rx swapping working?