STM32 USB Host. Virtual Port Com. FTDI and CH340
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-23 5:18 AM
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?
- Labels:
-
STM32G0 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-23 6:45 AM - edited ‎2025-06-23 6:51 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-23 6:55 AM
@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, ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-24 2:48 AM
Unfortunately I didn't find any third party libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-24 3:01 AM
Really - None at all?
@Pavel A. suggested Segger: https://www.segger.com/products/connectivity/emusb/
There's ThreadX USBx: https://github.com/eclipse-threadx/usbx - for which ST has (had?) some support:
https://wiki.st.com/stm32mcu/wiki/Introduction_to_USBX
and that's just in 1 minute searching ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-24 4:15 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-24 11:39 AM
