cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4, CDC and RS232 signals

Heinrich
Associate III

Hello all,

I have a RS232 device (diagnose interface) that I want to replace with a Nucleo-G431KB board. To make it work I would like to use CDC (virtual port), but I need the RS232 specific signals, especially DTR/DSR, CTS/RTS... I looked in the example but I did not find anything regarding this.

Thanks for the help!

2 REPLIES 2
gbm
Lead III

Not very simple. For outputs, you need to implement SetLineState request (easy). For inputs, you need to handle notification endpoint which service is completely omitted from ST CDC class implementation. So better search for some lightweight and complete STM32 USB CDC on github. AFAIK, there is some stuff like F103 USB-UART interface which should be a better starting point than CubeMX-generated code.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
MM..1
Chief II

Only CTS and RTS hardware flow control USART is privided on STM read datasheet