Skip to main content
KSzet
Visitor II
March 5, 2019
Question

How to Configure 2 USARTs, One Receive Only vs One Transmit Only + RS485 DE

  • March 5, 2019
  • 0 replies
  • 535 views

I am using STM32L432KC: USART1_TX+USART1_DE+USART2_RX. Both are LL drivers.

Currently I have to:

- created 2 additional MX projects

- one with USART1_TX+USART1_DE and dummy USART1_RX pin, set to Mode: Asynchronous + but Data Direction: Transmit Only + Hardware Flow Control (RS485) + DMA USART1_TX

- another with USART2_RX and dummy USART2_TX pin, set to Mode: Asynchronous + but Data Direction: Receive Only + DMA USART2_RX

- Generated the codes and copy the LL init codes of USART1 and USART2 to my own project

- remove dummy USART1_RX and dummy USART2_TX init

Nice to see STM32CubeMX supports such configuration in near future.

This topic has been closed for replies.