USB Host Dual and Quad FTDI support with possible bugs? #3264
Unanswered
fertinator
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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