cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 F407G trouble USB CDC

Mku1
Associate III

Hi, can somebody help with USB CDC on stm32f407G-DISC. I have configure in CUBE MX to use usb CDC in FS and when i connect to PC ( WINDOWS 10)  i see setting up device (STM32_Comport) and then pc says that USB serial device is ready to use. Why window give name to "USB serial device" and not "STM32_Comport"?

1 ACCEPTED SOLUTION

Accepted Solutions
Bob S
Principal

Because that is the string in the .inf file that Windows uses for its "in box" USB CDC driver. It overrides any string that you put in the STM32's USB descriptors. So unless you provide your own .inf file (which must be signed), you cannot control the name that Windows shows in Device Manager.

View solution in original post

5 REPLIES 5
Bob S
Principal

Because that is the string in the .inf file that Windows uses for its "in box" USB CDC driver. It overrides any string that you put in the STM32's USB descriptors. So unless you provide your own .inf file (which must be signed), you cannot control the name that Windows shows in Device Manager.

Mku1
Associate III

Thx, can you maybe help where you can configure baudrate?

Configure the baud rate on the PC side? That should be done in whatever program you use to talk to the STM32 board. On the STM32 side, unless you are taking the data from the USB CDC and outputting it to a physical UART/USART port, you don't need to set a baud rate. And you don't care WHAT baud rate the PC tells you (other than storing it so you can return the same data when the PC asks for the current baud rate settings). Search the forums for CDC_SET_LINE_CODING or CDC_GET_LINE_CODING.

Mku1
Associate III

thank you very much

If that answered your questions, please mark this thread as "answered" 🙂