USB Host Dual and Quad FTDI support with possible bugs? #3264
Replies: 4 comments 1 reply
-
|
Hi, |
Beta Was this translation helpful? Give feedback.
-
|
You can try #3501 |
Beta Was this translation helpful? Give feedback.
-
|
Hi, Also from the 2nd device the p_cdc doesn't line up with the interface, only the endpoints are stored properly. Transfer is therefore also not initiated properly. Running tuh_cdc_read_clear(idx) after all enumeration is done will start all transactions.
I added following 2 defines in the tusb_config.h: I haven't tried above commit, it could work without my mods, but it's up to you to test it. Ugh. Code doesn't format well. Sorry about that |
Beta Was this translation helpful? Give feedback.
-
|
should be fixed by #3513 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am working on a LPC55S69 with USB host on USB0 with the OHCI driver.
I need to connect a FT4232H to the USB and interface with all 4 ports.
I got it partially working now but I did need to add 2 lines of code to the library to make it work better.
First the important configuration settings that I used:
When connecting the FT4232 the device is recognized and proper endpoints are opened. It went wrong with the configuration thereafter. With any value of CFG_TUH_CDC higher than 1, the configuration got stuck into an endless loop.
I fixed this by changing the ift_offset in cdc_host.c in function set_config_complete from:
const uint8_t itf_offset = (p_cdc->serial_drid == SERIAL_DRIVER_ACM) ? 1 : 0;to
const uint8_t itf_offset = p_cdc->ftdi.channel - 1;Also the ftdi.channel is not properly updated in the driver so that needed also fixing in cdc_host.c in function ftdi_proccess_set_config
This solution made it at least possible to send data from LPC to the TX ports. However I am still only able to receive from 1 port, still debugging that.
It's not yet fully clear to me what the proper configuration is. For example 1 FT4232 vs 4 FT232.
In case of the FT4232 should the bInterfaceNumber property be always 0 while the ftdi_private_t ftdi.channel should be 1-4?
And for the 4 FT232 there should be 4 different bInterfaceNumber values?
What I am missing is the distinction of 1 device with 4 uarts and 4 devices with each 1 uart. I feel that is also missing from the implementation?
Beta Was this translation helpful? Give feedback.
All reactions