Skip to main content
Heinrich
Associate III
January 18, 2023
Question

STM32G4, CDC and RS232 signals

  • January 18, 2023
  • 2 replies
  • 1046 views

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!

This topic has been closed for replies.

2 replies

gbm
Super User
January 18, 2023

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
Super User
January 18, 2023

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