> it wouldn't work with the HID example and after reading up on USB's Communication Device Class I can get the virtual serial port only to about 128 kB/sec.
Yes - using HID means that you have to rely on two 'interrupt' endpoints in your interface (the USB configuration your O/S selects is theoretically composed of a number of interfaces, but HID uses only one). Interrupt endpoints exchange interrupt packets that can be issued only once per frame (i.e. once per ms) or possibly (if you support them) in a small number of microframes (of which there are 8 per frame). In USB 1.1 (full speed) the maximum size of a transfer is 64 bytes.
If you were to use USB 2 (hi speed, which I expect your hardware is capable of) the maximum transfer size rises significantly to 1KB. But your bandwidth limitation still derives from you choice of the HID class.
Greater performance (although less predictable latency) can be achieved by using your interface definition (and therefore class), e.g. using 'bulk' endpoints, as David proposes.
> Is there some way to get to Full-Speed without having to develop a device-specific Windows driver myself? (unfortunately, using libusb-win32 or libusbk is not an option :-/)
In principle I think "any" user-mode (i.e. non-kernel-mode) USB library should do. But actually we've never looked beyond libusb (it's mulit-platform and what we use in LPCXpresso).
Sincerely
LPCXpresso IDE Support
Hey Tim,
I've developed a full-speed USB solution on LPC1788. When I saw this post I thought I might as well create an account since it was a real pain. My device is set up to communicate using endpoint 2 IN & OUT (bulk endpoints) with 64-bit max packet size. For the device descriptors I use vendor-specific device class (0xFF).
I went the route of developing an actual device-specific Windows driver based on WinUSB, which took a while and was annoying. I know you want to avoid that. A colleague of mine recently told me about a .NET project called LibUsbDotNet (http://libusbdotnet.sourceforge.net/V2/Index.html), which allows you to really easily create a high-level library/application for communicating with your device. It works for both Windows and UNIX environments, using WinUSB on Windows and libusb for OS X or Linux environments. I've created and tested an application to control my device on both Windows and Ubuntu environments using this project and it works fine. It also apparently includes an INF generation wizard, which I haven't used myself but hopefully should help you out (see the section "Getting Started With Windows").
As for the USB code on the LPC1788 itself, I mostly just copied and pasted the NXP examples for it that come with IAR Embedded Workbench.