EmbeddedRelated.com
Forums

LPC2148 USB Endpoints

Started by rtstofer November 4, 2007
I have an application where I want to use the LPC2148 to receive and
store on SD card the configuration file for an FPGA and subsequently
use the file to configure the FPGA at startup. No problem here as
there is sample code at OpenCores for doing this with an 8051 clone.

However, my typical FPGA application can use some serial ports.
Something on the order of 4 seems about right.

So, I thought I would build a board with a USB hub, the LPC2148 and a
couple of FTDI USB<->Serial chips. For this to work, I need 3 VCOM
endpoints inside the 2148. One for the FPGA configuartion application
and 2 for serial ports. I figured I would just put some queues
between the USB endpoints and the USARTs.

I could just use more FTDI chips and skip the idea of multiple
endpoints in the 2148 but I thought I would ask if anyone had any
thoughts on this idea.

The endgame? By changing the SD card, the FPGA can emulate a Z80
running CP/M 2.2, and IBM1130 running Disk Monitor V2 or a PDP11-40
running Unix V6. The first two are running and the PDP11 is under
consideration. This interface board provides for the requisite
terminals and allows configurations to be installed on SD cards. All
on a single USB cable if I can get it to work...

Thanks
Richard

An Engineer's Guide to the LPC2100 Series

Hello Richard,

This example from NXP will help you.

"AN10420: USB Virtual COM Port on LPC214x"
http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10420.pdf

"Sample Code for AN10420 USB Virtual COM Port on LPC214x"
http://www.standardics.nxp.com/support/documents/microcontrollers/zip/code.lpc214x.usb.zip

This example implements dual virtual COM ports (VCP) on LPC214x for
Windows. It is realized on a custom device driver, which accepts
composite device configuration perfectly. Then, you can increase the
number of VCPs as many as the endpoints allows.

A single VCP of this implementation takes one interrupt IN EP and a
pair of bulk IN/OUT EPs. LPC214x has five pair of interrupt IN/OUT EPs
and six pairs of bulk IN/OUT EPs. Then, five VCPs are available on
LPC214x.

To increase the number of VCPs, there is no need to rewrite the device
driver. Modify just INF file (PLP2KUS.INT) as follows.

(dual VCPs)
[MRI]
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
(five VCPs)
[MRI]
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_02
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_03
%PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_04
Of course, the firmware is required to rewrite intensively.
On the firmware, single interface corresponds to single VCP. Handling
of USB EPs on firmware is symmetric to interfaces. Then, copy and
modify the routines on a single interface.

Of course, LPC214x doesn't have five UARTs.
The VCPs are connected to the FPGA over parallel bus, instead of UART.

I wrote a summary on composite device here,
"USB Composite Device" on SiLabs forum
http://www.cygnal.org/ubb/Forum9/HTML/001050.html

The example on this topic is written for C8051, but the topic itself
is applicable to any USB MCU.

Tsuneo

--- In l..., "rtstofer" wrote:
>
> I have an application where I want to use the LPC2148 to receive and
> store on SD card the configuration file for an FPGA and subsequently
> use the file to configure the FPGA at startup. No problem here as
> there is sample code at OpenCores for doing this with an 8051 clone.
>
> However, my typical FPGA application can use some serial ports.
> Something on the order of 4 seems about right.
>
> So, I thought I would build a board with a USB hub, the LPC2148 and a
> couple of FTDI USB<->Serial chips. For this to work, I need 3 VCOM
> endpoints inside the 2148. One for the FPGA configuartion application
> and 2 for serial ports. I figured I would just put some queues
> between the USB endpoints and the USARTs.
>
> I could just use more FTDI chips and skip the idea of multiple
> endpoints in the 2148 but I thought I would ask if anyone had any
> thoughts on this idea.
>
> The endgame? By changing the SD card, the FPGA can emulate a Z80
> running CP/M 2.2, and IBM1130 running Disk Monitor V2 or a PDP11-40
> running Unix V6. The first two are running and the PDP11 is under
> consideration. This interface board provides for the requisite
> terminals and allows configurations to be installed on SD cards. All
> on a single USB cable if I can get it to work...
>
> Thanks
> Richard
>
--- In l..., "t_chinzei" wrote:
>
> Hello Richard,
>
> This example from NXP will help you.
>
> "AN10420: USB Virtual COM Port on LPC214x"
>
http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10420.pdf
>
> "Sample Code for AN10420 USB Virtual COM Port on LPC214x"
>
http://www.standardics.nxp.com/support/documents/microcontrollers/zip/code.lpc214x.usb.zip
>
> This example implements dual virtual COM ports (VCP) on LPC214x for
> Windows. It is realized on a custom device driver, which accepts
> composite device configuration perfectly. Then, you can increase the
> number of VCPs as many as the endpoints allows.
>
> A single VCP of this implementation takes one interrupt IN EP and a
> pair of bulk IN/OUT EPs. LPC214x has five pair of interrupt IN/OUT EPs
> and six pairs of bulk IN/OUT EPs. Then, five VCPs are available on
> LPC214x.
>
> To increase the number of VCPs, there is no need to rewrite the device
> driver. Modify just INF file (PLP2KUS.INT) as follows.
>
> (dual VCPs)
> [MRI]
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
> (five VCPs)
> [MRI]
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_02
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_03
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_04
> Of course, the firmware is required to rewrite intensively.
> On the firmware, single interface corresponds to single VCP. Handling
> of USB EPs on firmware is symmetric to interfaces. Then, copy and
> modify the routines on a single interface.
>
> Of course, LPC214x doesn't have five UARTs.
> The VCPs are connected to the FPGA over parallel bus, instead of UART.
>
> I wrote a summary on composite device here,
> "USB Composite Device" on SiLabs forum
> http://www.cygnal.org/ubb/Forum9/HTML/001050.html
>
> The example on this topic is written for C8051, but the topic itself
> is applicable to any USB MCU.
>
> Tsuneo

Thank you for your reply. I tried working with JC Wren's demo code
and it hoses my Linux box USB system (probably because I have a rather
old version of RedHat Enterprise WS 4). Then I tried LPCUSB and,
while it works, under WinXP I get a transfer rate around 800
chars/sec. A regular USB<->Serial cable doesn't do a lot better -
perhaps 1500 chars/sec. My guess is that the system transfers one
char per scan.

This is adequate for terminals, I suppose, but it certainly isn't
useful in transferring a 400kB FPGA .bit file.

So, for the moment, I have junked the USB idea and am working with the
Blackfin SPORT - a very fast DMA connected synchronous serial port on
a 500 MHz (internal clock) chip. The idea is to FTP the file to the
Blackfin board and let it handle FPGA programming. I need to transfer
about 10 Mb/sec if I want to go as fast as the FPGA can accept the stream.

It takes about one second to open the FTP session and transfer the
file to the Blackfin board.

If I get FPGA programming to work over the network, I may use the
Blackfin board to pretend it has the serial ports I need. There are a
number of ways to interface this with the FPGA. I can then open these
ports with Telnet sessions; details omitted because I have no idea how
to make it work. Sockets comes to mind...

Richard
This description is very nice.

I'm planning to use standard usbser.sys and standard USB-storage device.
My CDC-ACM uses two endpoints, and there is another one for storage.

How to write .inf file for this situation?
Should USB-STORAGE come as first interface?

Now I have:

=======================================================================[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
LayoutFile=layout.inf
Provider=%DGT%
DriverVer/01/2007,0.0.1.0

[Manufacturer]
%XX%=GSerialDeviceList

[GSerialDeviceList]
%GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002&MI_01
%GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002&MI_02

[DestinationDirs]
DefaultDestDir,System32\Drivers

[GSerialInstall]
CopyFiles=GSerialCopyFiles
AddReg=GSerialAddReg

[GSerialCopyFiles]
usbser.sys

[GSerialAddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,usbser.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

[GSerialInstall.Services]
AddService = usbser,0x0002,GSerialService

[GSerialService]
DisplayName = %GSERIAL_DISPLAY_NAME%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %10%\System32\Drivers\usbser.sys
LoadOrderGroup = Base

[Strings]
DGT = "XX"
GSERIAL = "XX USB"
GSERIAL_DISPLAY_NAME = "XX USB"

====================================================================
With %GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002
and only 2 endpoints (for CDC-ACM) it woks.

With only one endpoint for USB-STORAGE it works without any inf file.

The plan is to store CDC-ACM inf file on STORAGE.
It should contain only ACM device description.

Any one could help me with that?
Thanks in advance.

> Hello Richard,
>
> This example from NXP will help you.
>
> "AN10420: USB Virtual COM Port on LPC214x"
> http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10420.pdf
>
> "Sample Code for AN10420 USB Virtual COM Port on LPC214x"
> http://www.standardics.nxp.com/support/documents/microcontrollers/zip/code.lpc214x.usb.zip
>
> This example implements dual virtual COM ports (VCP) on LPC214x for
> Windows. It is realized on a custom device driver, which accepts
> composite device configuration perfectly. Then, you can increase the
> number of VCPs as many as the endpoints allows.
>
> A single VCP of this implementation takes one interrupt IN EP and a
> pair of bulk IN/OUT EPs. LPC214x has five pair of interrupt IN/OUT EPs
> and six pairs of bulk IN/OUT EPs. Then, five VCPs are available on
> LPC214x.
>
> To increase the number of VCPs, there is no need to rewrite the device
> driver. Modify just INF file (PLP2KUS.INT) as follows.
>
> (dual VCPs)
> [MRI]
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
> (five VCPs)
> [MRI]
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_02
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_03
> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_04
> Of course, the firmware is required to rewrite intensively.
> On the firmware, single interface corresponds to single VCP. Handling
> of USB EPs on firmware is symmetric to interfaces. Then, copy and
> modify the routines on a single interface.
>
> Of course, LPC214x doesn't have five UARTs.
> The VCPs are connected to the FPGA over parallel bus, instead of UART.
>
> I wrote a summary on composite device here,
> "USB Composite Device" on SiLabs forum
> http://www.cygnal.org/ubb/Forum9/HTML/001050.html
>
> The example on this topic is written for C8051, but the topic itself
> is applicable to any USB MCU.
>
> Tsuneo
>
> --- In l..., "rtstofer" wrote:
>
>> I have an application where I want to use the LPC2148 to receive and
>> store on SD card the configuration file for an FPGA and subsequently
>> use the file to configure the FPGA at startup. No problem here as
>> there is sample code at OpenCores for doing this with an 8051 clone.
>>
>> However, my typical FPGA application can use some serial ports.
>> Something on the order of 4 seems about right.
>>
>> So, I thought I would build a board with a USB hub, the LPC2148 and a
>> couple of FTDI USB<->Serial chips. For this to work, I need 3 VCOM
>> endpoints inside the 2148. One for the FPGA configuartion application
>> and 2 for serial ports. I figured I would just put some queues
>> between the USB endpoints and the USARTs.
>>
>> I could just use more FTDI chips and skip the idea of multiple
>> endpoints in the 2148 but I thought I would ask if anyone had any
>> thoughts on this idea.
>>
>> The endgame? By changing the SD card, the FPGA can emulate a Z80
>> running CP/M 2.2, and IBM1130 running Disk Monitor V2 or a PDP11-40
>> running Unix V6. The first two are running and the PDP11 is under
>> consideration. This interface board provides for the requisite
>> terminals and allows configurations to be installed on SD cards. All
>> on a single USB cable if I can get it to work...
>>
>> Thanks
>> Richard
>>
>>
>
>
Hi,

regarding the speed of CDC serial.
If you use a terminal client to access to COM port, it will send
characters one-by-one (most of them calls getch() and puth() equivalent
functions). Due the way USB works this means best case a single
character is transferred each mS.
To see how fast CDC can go execute

copy filename >COMx

in a command prompt. This will stuff the bus with data. (If you have
cygwin you can use dd to measure the speed.)

What I am trying to say is if you write your own application on the
windows side and start multiple overlapped transfers, you can get far
better speed results.

Foltos

rtstofer wrote:
> --- In l..., "t_chinzei" wrote:
>
>> Hello Richard,
>>
>> This example from NXP will help you.
>>
>> "AN10420: USB Virtual COM Port on LPC214x"
>>
>>
> http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10420.pdf
>
>> "Sample Code for AN10420 USB Virtual COM Port on LPC214x"
>>
>>
> http://www.standardics.nxp.com/support/documents/microcontrollers/zip/code.lpc214x.usb.zip
>
>> This example implements dual virtual COM ports (VCP) on LPC214x for
>> Windows. It is realized on a custom device driver, which accepts
>> composite device configuration perfectly. Then, you can increase the
>> number of VCPs as many as the endpoints allows.
>>
>> A single VCP of this implementation takes one interrupt IN EP and a
>> pair of bulk IN/OUT EPs. LPC214x has five pair of interrupt IN/OUT EPs
>> and six pairs of bulk IN/OUT EPs. Then, five VCPs are available on
>> LPC214x.
>>
>> To increase the number of VCPs, there is no need to rewrite the device
>> driver. Modify just INF file (PLP2KUS.INT) as follows.
>>
>> (dual VCPs)
>> [MRI]
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
>> (five VCPs)
>> [MRI]
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_02
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_03
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_04
>> Of course, the firmware is required to rewrite intensively.
>> On the firmware, single interface corresponds to single VCP. Handling
>> of USB EPs on firmware is symmetric to interfaces. Then, copy and
>> modify the routines on a single interface.
>>
>> Of course, LPC214x doesn't have five UARTs.
>> The VCPs are connected to the FPGA over parallel bus, instead of UART.
>>
>> I wrote a summary on composite device here,
>> "USB Composite Device" on SiLabs forum
>> http://www.cygnal.org/ubb/Forum9/HTML/001050.html
>>
>> The example on this topic is written for C8051, but the topic itself
>> is applicable to any USB MCU.
>>
>> Tsuneo
>>
>
> Thank you for your reply. I tried working with JC Wren's demo code
> and it hoses my Linux box USB system (probably because I have a rather
> old version of RedHat Enterprise WS 4). Then I tried LPCUSB and,
> while it works, under WinXP I get a transfer rate around 800
> chars/sec. A regular USB<->Serial cable doesn't do a lot better -
> perhaps 1500 chars/sec. My guess is that the system transfers one
> char per scan.
>
> This is adequate for terminals, I suppose, but it certainly isn't
> useful in transferring a 400kB FPGA .bit file.
>
> So, for the moment, I have junked the USB idea and am working with the
> Blackfin SPORT - a very fast DMA connected synchronous serial port on
> a 500 MHz (internal clock) chip. The idea is to FTP the file to the
> Blackfin board and let it handle FPGA programming. I need to transfer
> about 10 Mb/sec if I want to go as fast as the FPGA can accept the stream.
>
> It takes about one second to open the FTP session and transfer the
> file to the Blackfin board.
>
> If I get FPGA programming to work over the network, I may use the
> Blackfin board to pretend it has the serial ports I need. There are a
> number of ways to interface this with the FPGA. I can then open these
> ports with Telnet sessions; details omitted because I have no idea how
> to make it work. Sockets comes to mind...
>
> Richard
>
>
Hi,

to get usbser.sys working with a composite device you need two updates
on windows XP (KB918365 and KB935892). These will not be installed
automatically and you have to ask for them on Microsoft homepage. If you
don't want to or can not ensure your customers will have these fixes,
try libusb. Easy to use and works on many OS:s. The only drawback is you
will not have a COM port on the PC and thus existing software can not
access the USB device.
If you have the two hot fix installed, the order of interfaces does not
matter. It is highly advised though to use interface association
descriptors.

You only need an inf file for the CDC functionality. The mass-storage is
auto detected by windows.
Mass-storage needs two BULK endpoints (somebody mentioned only one below).

Ahh yes, and the inf file below will not work on Vista. (It will only
work if cdcser.sys is already extracted from the .cab files by a
previously installed device. Otherwise you will get a file not found
error during device initialization.)

Foltos

(ps: the company I am working for sells USB solutions (both PC and
embedded side). If you are interested drop an email to me.)

Wojciech Kromer wrote:
> This description is very nice.
>
> I'm planning to use standard usbser.sys and standard USB-storage device.
> My CDC-ACM uses two endpoints, and there is another one for storage.
>
> How to write .inf file for this situation?
> Should USB-STORAGE come as first interface?
>
> Now I have:
>
> =======================================================================> [Version]
> Signature="$Windows NT$"
> Class=Ports
> ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
> LayoutFile=layout.inf
> Provider=%DGT%
> DriverVer/01/2007,0.0.1.0
>
> [Manufacturer]
> %XX%=GSerialDeviceList
>
> [GSerialDeviceList]
> %GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002&MI_01
> %GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002&MI_02
>
> [DestinationDirs]
> DefaultDestDir,System32\Drivers
>
> [GSerialInstall]
> CopyFiles=GSerialCopyFiles
> AddReg=GSerialAddReg
>
> [GSerialCopyFiles]
> usbser.sys
>
> [GSerialAddReg]
> HKR,,DevLoader,,*ntkern
> HKR,,NTMPDriver,,usbser.sys
> HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
>
> [GSerialInstall.Services]
> AddService = usbser,0x0002,GSerialService
>
> [GSerialService]
> DisplayName = %GSERIAL_DISPLAY_NAME%
> ServiceType = 1
> StartType = 3
> ErrorControl = 1
> ServiceBinary = %10%\System32\Drivers\usbser.sys
> LoadOrderGroup = Base
>
> [Strings]
> DGT = "XX"
> GSERIAL = "XX USB"
> GSERIAL_DISPLAY_NAME = "XX USB"
>
> ====================================================================>
> With %GSERIAL%=GSerialInstall, USB\VID_xxxx&PID_0002
> and only 2 endpoints (for CDC-ACM) it woks.
>
> With only one endpoint for USB-STORAGE it works without any inf file.
>
> The plan is to store CDC-ACM inf file on STORAGE.
> It should contain only ACM device description.
>
> Any one could help me with that?
> Thanks in advance.
>
>
>> Hello Richard,
>>
>> This example from NXP will help you.
>>
>> "AN10420: USB Virtual COM Port on LPC214x"
>> http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/an10420.pdf
>>
>> "Sample Code for AN10420 USB Virtual COM Port on LPC214x"
>> http://www.standardics.nxp.com/support/documents/microcontrollers/zip/code.lpc214x.usb.zip
>>
>> This example implements dual virtual COM ports (VCP) on LPC214x for
>> Windows. It is realized on a custom device driver, which accepts
>> composite device configuration perfectly. Then, you can increase the
>> number of VCPs as many as the endpoints allows.
>>
>> A single VCP of this implementation takes one interrupt IN EP and a
>> pair of bulk IN/OUT EPs. LPC214x has five pair of interrupt IN/OUT EPs
>> and six pairs of bulk IN/OUT EPs. Then, five VCPs are available on
>> LPC214x.
>>
>> To increase the number of VCPs, there is no need to rewrite the device
>> driver. Modify just INF file (PLP2KUS.INT) as follows.
>>
>> (dual VCPs)
>> [MRI]
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
>> (five VCPs)
>> [MRI]
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_00
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_01
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_02
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_03
>> %PhilipsUSBSerial%=Philips.Install,USB\VID_C251&PID_1305&MI_04
>> Of course, the firmware is required to rewrite intensively.
>> On the firmware, single interface corresponds to single VCP. Handling
>> of USB EPs on firmware is symmetric to interfaces. Then, copy and
>> modify the routines on a single interface.
>>
>> Of course, LPC214x doesn't have five UARTs.
>> The VCPs are connected to the FPGA over parallel bus, instead of UART.
>>
>> I wrote a summary on composite device here,
>> "USB Composite Device" on SiLabs forum
>> http://www.cygnal.org/ubb/Forum9/HTML/001050.html
>>
>> The example on this topic is written for C8051, but the topic itself
>> is applicable to any USB MCU.
>>
>> Tsuneo
>>
>> --- In l..., "rtstofer" wrote:
>>
>>
>>> I have an application where I want to use the LPC2148 to receive and
>>> store on SD card the configuration file for an FPGA and subsequently
>>> use the file to configure the FPGA at startup. No problem here as
>>> there is sample code at OpenCores for doing this with an 8051 clone.
>>>
>>> However, my typical FPGA application can use some serial ports.
>>> Something on the order of 4 seems about right.
>>>
>>> So, I thought I would build a board with a USB hub, the LPC2148 and a
>>> couple of FTDI USB<->Serial chips. For this to work, I need 3 VCOM
>>> endpoints inside the 2148. One for the FPGA configuartion application
>>> and 2 for serial ports. I figured I would just put some queues
>>> between the USB endpoints and the USARTs.
>>>
>>> I could just use more FTDI chips and skip the idea of multiple
>>> endpoints in the 2148 but I thought I would ask if anyone had any
>>> thoughts on this idea.
>>>
>>> The endgame? By changing the SD card, the FPGA can emulate a Z80
>>> running CP/M 2.2, and IBM1130 running Disk Monitor V2 or a PDP11-40
>>> running Unix V6. The first two are running and the PDP11 is under
>>> consideration. This interface board provides for the requisite
>>> terminals and allows configurations to be installed on SD cards. All
>>> on a single USB cable if I can get it to work...
>>>
>>> Thanks
>>> Richard
>>>
>>>
>>>
>>
>>
>
Thank you for fast reply.
> to get usbser.sys working with a composite device you need two updates
> on windows XP (KB918365 and KB935892). These will not be installed
> automatically and you have to ask for them on Microsoft homepage. If you
> don't want to or can not ensure your customers will have these fixes,
> try libusb. Easy to use and works on many OS:s. The only drawback is you
> will not have a COM port on the PC and thus existing software can not
> access the USB device.
> If you have the two hot fix installed, the order of interfaces does not
> matter. It is highly advised though to use interface association
> descriptors.
>

I need to provide standard COM and modem device.
> You only need an inf file for the CDC functionality. The mass-storage is
> auto detected by windows.
> Mass-storage needs two BULK endpoints (somebody mentioned only one below).
>
>
I need:
- one CDC control interface with 1 enpoint for CDC (IN Interrupt)
- second CDC interface for data with 2 enpoints (Bulk IN and OUT)
- and finally one STORAGE interface with 2 enpoints (Bulk IN and OUT)

Am I wrong with that?

> Ahh yes, and the inf file below will not work on Vista. (It will only
> work if cdcser.sys is already extracted from the .cab files by a
> previously installed device. Otherwise you will get a file not found
> error during device initialization.)
>
>
Is there any way to make it work booth on XP and VISTA?
If multi-device is not possible, I need only CDC-ACM.

Hi,

see my comments below.

Wojciech Kromer wrote:
> Thank you for fast reply.
>
>> to get usbser.sys working with a composite device you need two updates
>> on windows XP (KB918365 and KB935892). These will not be installed
>> automatically and you have to ask for them on Microsoft homepage. If you
>> don't want to or can not ensure your customers will have these fixes,
>> try libusb. Easy to use and works on many OS:s. The only drawback is you
>> will not have a COM port on the PC and thus existing software can not
>> access the USB device.
>> If you have the two hot fix installed, the order of interfaces does not
>> matter. It is highly advised though to use interface association
>> descriptors.
>>
>>
>
> I need to provide standard COM and modem device.
>
The .inf file posted by Wojciech Kromer will create a COM port. Of
course you can use it like a modem, but alternatively it is possible to
define your device as a modem with a COM port on it. The second way
enables you to define AT commands and other modem specific stuff.
Unfortunately I am not an expert of this. I know this exists because I
started with a modem .inf file when I put our .inf for the COM port
together. I had to change the inf to make our device create a COM port only.
>> You only need an inf file for the CDC functionality. The mass-storage is
>> auto detected by windows.
>> Mass-storage needs two BULK endpoints (somebody mentioned only one below).
>>
>>
>>
> I need:
> - one CDC control interface with 1 enpoint for CDC (IN Interrupt)
> - second CDC interface for data with 2 enpoints (Bulk IN and OUT)
> - and finally one STORAGE interface with 2 enpoints (Bulk IN and OUT)
>
> Am I wrong with that?
>
No, you are right. You should add an "interface association descriptor"
to bound the two CDC interfaces together.

>
>> Ahh yes, and the inf file below will not work on Vista. (It will only
>> work if cdcser.sys is already extracted from the .cab files by a
>> previously installed device. Otherwise you will get a file not found
>> error during device initialization.)
>>
>>
>>
> Is there any way to make it work booth on XP and VISTA?
> If multi-device is not possible, I need only CDC-ACM.
>
Yes, there is. Add

include=mdmcpq.inf

to the start of [GserialInstall] and [GSerialInstall.Services]. This
should be enough.

Foltos