Skip to main content
Visitor II
February 28, 2020
Solved

STM32 F407G trouble USB CDC

  • February 28, 2020
  • 2 replies
  • 1162 views

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"?

    This topic has been closed for replies.
    Best answer by Bob S

    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.

    2 replies

    Bob SAnswer
    Super User
    February 28, 2020

    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.

    Mku1Author
    Visitor II
    March 2, 2020

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

    Super User
    March 2, 2020

    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.

    Mku1Author
    Visitor II
    March 3, 2020

    thank you very much