cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect STM32 Virtual COM Port (USB CDC) to RS485 bus using external converter

Sujith
Associate III

Hi,
I’m using an STM32L412RB where the USB DM/DP lines are already configured as a Virtual COM Port (USB CDC device).

Now I want to communicate with an RS485 bus without changing the existing board hardware.
My idea is to build a small adapter board that connects the STM32 USB DM/DP pins to an external USB-to-RS485 converter (which has DM and DP lines).

Is it possible to design such an adapter to convert the STM32’s USB VCP interface to RS485?
Can the STM32 (configured as a USB device) send and receive RS485 data through this path:

STM32 (USB CDC Device) → USB DM/DP → USB-to-RS485 Converter → RS485 Bus

Any guidance or reference designs would be helpful.

Thanks,
Sujith

2 REPLIES 2
AScha.3
Super User

Hi,

>Can the STM32 (configured as a USB device) send and receive RS485 data through this ..

No. (At least would need another cpu, like STM32 , to be USB host and send on its uart...) :)

 

Use an uart with rs485 (DE) capability, look what uarts on L412 can do it

....then connect a rs485 driver/transceiver here; clear and simple.

If you feel a post has answered your question, please click "Accept as Solution".
FBL
ST Employee

Hi @Sujith 

Unfortunately, there are no specific examples in the provided context for implementing this bridge with STM32.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.