0
votes

I would like to develop an FPGA that includes USB controller and its USB controller implements USB to serial protocol. I thought USB to serial adapter was much like keyboard or mouse. But I found the opposite. The devices I tested use "vendor specific" protocol. This means each USB serial driver requires its own driver, which seems very inefficient.

This may not be a problem for most engineers as they can buy a USB serial adapter from a store and its vendor provides the necessary software.

But if I want to develop my own USB to serial device inside the FPGA, I have to start from scratch. I don't want to develop my own protocol, my own driver.

Is there any USB to serial protocol that is open (and Linux driver is available) so that I can implement without infringing somebody's right?

It doesn't make sense to re-invent the wheel. Any comments, any suggestions would be greatly appreciated.

Thanks!
Aki-

1

1 Answers

0
votes

You search for CDC device class. If you deploy device, there is often VID&PID combination from device (chip) vendor which is free to use with products.

USB classes description here

You definitely should provide the product with unique serial number (often there is hard flashed one in on-chip ROM), so your product can be bound to same device path (same COM# in Windows).

Device configuration is given by its descriptors. Through descriptors you should provide serial number as stated above. CDC device class has minimal implementation which consists of one setup endpoint used for line configuration (most requests can be replied with "not supported") and two bulk endpoints for data in and data out. With minimalistic implementation the data endpoints are raw data - what is sent on PC side is received on device side and vice versa. But there is no barrier to use some modem protocol on top of that.

Haven't done this on FPGA but on several MCUs. As a start point I will download CDC demo for some modern MCU like AVR or some little ARM (NXP 11U serie for example) to take inspiration from.

Support of CDC device class under Linux is good, using some utilities like lsusb is very helpful during development. On Windows platform the situation got far better with Win7, under WinXP you have to provide specific .inf file for each VID&PID combination to use generic serial driver and your device to appear as COM#.