cancel
Showing results for 
Search instead for 
Did you mean: 

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?

FG
Associate

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

1 ACCEPTED SOLUTION

Accepted Solutions

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 Venmo Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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 Venmo Up vote any posts that you find helpful, it shows what's working..
T J
Lead

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
Lead

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.