Skip to main content
Visitor II
June 23, 2025
Question

STM32 USB Host. Virtual Port Com. FTDI and CH340

  • June 23, 2025
  • 2 replies
  • 1050 views

I use the stm32g0b1 microcontroller to USB Host. I use the HAL library from STMicroelectronics. Class for FS IP: Communication Host Class (Virtual Port Com). And it works great with other microcontrollers that use Class for FS IP: Communication Device Class (Virtual Port Com). Both from ST and from other companies. But if I connect a device from FTDI (for example FT230X or FT232) or from WCH (for example CH340/343) to the host, nothing works. Everything freezes on Appli_state == APPLICATION_START.

As far as I understand, many people have encountered this, but I have not found any solution to this on the Internet. Is it possible to somehow change the standard library for USB Host from ST so that it would be possible to connect such devices?

    This topic has been closed for replies.

    2 replies

    Super User
    June 23, 2025

    The FTDI and CH3xx chips aren't quite CDC compatible, thus a custom driver is needed. The simplest solution is to detect non-CDC devices and gracefully reject them. There are enough compatible CDC dongles around. If you insist on using non-CDC devices and cannot find a ready driver -  make your own, or have somebody else make it for you.

    3rd party USB libraries (Segger and others) may support these devices.

     

    Super User
    June 23, 2025

    @Pavel A. wrote:

    The FTDI and CH3xx chips aren't quite CDC compatible, thus a custom driver is needed. 


    ISTR finding that when I was thinking about doing such a thing a few years ago.

    @red15530 I suggest you try feeding your favourite internet search engine with queries like "FTDI microcontroller host",  "FTDI stm32 host", etc, ...

     

    red15530Author
    Visitor II
    June 24, 2025

    I found in one chinese site how to change standard library to work with CH3xx chips. Here . But I can't do it... Can anyone help with this?

    Super User
    June 24, 2025