Probably my question wasn't clear enough, I apologize for this.
I don't need to use UART interfaces of FX2LP device.
My need is to configure the FX2LP so that the host detects two serial ports when it is connected, and I can send/receive data to/from the FPGA (that is connected to the FX2LP's FIFOs) as if I have two serial devices, one of them bidirectional, and the other one unidirectional, (from the device to the host, IN).
As I wrote previously, I know that I have to use IADs (Interface Association Descriptor) in the USB descriptor, but I don't know exactly how to correctly define it.
I hope my problem is clear enough now.
Thank you, and happy new year to all!!
For COM port to come up in the host, the FX2LP device should enumerate as a CDC device. Please refer to AN58764 which implements a Virtual COM port using FX2LP.
Hope this is helpful.
Thanks and Regards,
thank you for the answer.
I already know how to configure the device as a CDC device to get one Virtual COM.
My problem is how to set the USB descriptor so that the host detects two different serial devices when i connect a single FX2LP device, so that i can receive / transmit data on two different "channels".
Thank you, very much.
I have made an example project for your reference, the project is attached to this response.
I used AN58764 as the base project. The attached project configures the FX2LP device as a composite device with 2 CDC ACM devices (2 COM ports) and uses EZ-USB's High-Speed Baud rate generator for supplying baud rate to both the serial ports. Since high speed baud rate generator is used only 2 baud rates can be selected:
115200 and 230400 respectively. Please refer to the firmware SerialInit() function.
If you need other baud rates, you can use Timer 1 for Serial port 1 and Timer 2 for Serial Port 0.
Please refer to EZ-USB Technical Reference Manual for more details.
CDT_VCP.zip 2.5 MB
I used the USB descriptor that I found in the sample project, making some small adjustments to fit it in my application, and now everything works fine.
Thank you, very much. Your support has been very valuable.