FX2LP descriptor for 2 UART on the same device

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaTo_687856
Level 1
Level 1

Hi !

I need to implement 2 UARTs on my board with a single FX2LP device.

One of them has to be bidirectional, the other one can be unidirectional (from device to host).

I know that I have to use IADs (Interface Association Descriptor), but i did several attempts with no results.

Can somebody tell me how to correctly define the USB descriptor (it would be useful to have an example...).

Thank you !

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello,

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.

Best Regards,

Yatheesh

View solution in original post

0 Likes
6 Replies
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

UART interface is present only in 100 pin and 128 pin packages.

Please refer to AN5009  Application note which uses UART for firmware debugging through UART prints.

Best Regards,

Yatheesh

0 Likes

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!!

0 Likes

Hello,

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,

Yatheesh

0 Likes

Hi Yatheesh,

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.

Saverio

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

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.

Best Regards,

Yatheesh

0 Likes

Hi Yatheesh,

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.

Saverio

0 Likes