Skip to main content
FG_it
Visitor II
August 12, 2018
Solved

Is it possible to use the USB-OTG-FS in the discovery board as a virtual COM port that communicates with a computer through USART?

  • August 12, 2018
  • 3 replies
  • 1799 views

Hi all,

I am new to USB communication so please forgive my imprecisions.

I am using the discovery board STM32F469I-DISCO. I have been able to establish serial communication through the programming port (the port connected to the ST-link/V2-1) using usart3 as it is its default configuration. I would like to do the same using the USB OTG FS integrated. Is it possible? If so, how can I achieve it? In other words how do I make the board show up as a virtual com port and communicate through USART using the USB OTG FS port?

Thank you,

Frank

This topic has been closed for replies.
Best answer by Tesla DeLorean

Well it's not going to manifest as a "USART" at the F4 end, but rather data through end-points

An example that might port over relatively easily

STM32Cube_FW_F4_V1.21.0\Projects\STM32469I_EVAL\Applications\USB_Device\CDC_Standalone

Or you could try your luck with CubeMX

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
August 12, 2018

Well it's not going to manifest as a "USART" at the F4 end, but rather data through end-points

An example that might port over relatively easily

STM32Cube_FW_F4_V1.21.0\Projects\STM32469I_EVAL\Applications\USB_Device\CDC_Standalone

Or you could try your luck with CubeMX

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
T J
Senior III
August 12, 2018

Very easy with the cube.

Select your device or board in the cube, select USB set it to CDC.

then follow the example, it works !

T J
Senior III
August 12, 2018

Actually, I use a true serial port for my work because when you use CDC , as your processor is reset, the CDC drops out and Windows has to adjust itself. then when your processor comes out of reset, the USB link is re-initialized and mostly works, but sometimes windows gets an error and doesn't recognize as a CDC port. then you need to "reset again and hold" until the device manager agrees it is a CDC port.

painful, so I use a MAX232 chip on my boards through a USB Dongle serial port which always remains connected in windows.