cancel
Showing results for 
Search instead for 
Did you mean: 

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

KSzet
Associate

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.

0 REPLIES 0