[Help] Sending bulkdata (~10Mbit/s) using the USB CDC device class on the Lpc 4330

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by m.yzb on Thu Nov 21 01:52:19 MST 2013

I'm currently working on a project with the goal of sending some "high speed" data from a host PC to the LPC 4330 (using the ngx LPC Xplorer 433x board). My Idea was to to this over the USB interface and I have been researching a lot about USB for the past few days.

I did a readup on the basics about USB, like the descriptors and how it is split down into device/configuration/inteface and endpoint descriptor. So  far I was thinking of setting up a composite device as a communication class device (CDC) because as I understand it would be then possible to use one interface as a communication interface to send commands/requests over a Virtual Serial port using a hyperterminal programm like TeraTerm and having a second interface, a data interface to send bulk data containing "code" that the microcontroller will do something with.

I don't need to be able to send the full 480MBit/s that support USB2.0 but having transferspeeds in the 10Mbit/s range would be nice. I understand that the Busspeed is fixed for USB2.0 and that to get a higher throughput you have to send more "frames" but I'm really clueless on where to set the "frame amount" to achieve this.

As a basis for my code I wanted to use the USBD ROM CDC or USBD ROM composite project in LpcOpen 2.02 (lpc 4330). I have managed to partially break down the CDC project and understand that the microcontroller each time reads  the data located at the adress of the "g_rxBuff[0]" and reads the buffer until the byte number "256" and echoes each byte (char) back.

Apparently from what I have read the PC is in charge of picking the transfer type and taking a look at the descriptor there is an instance in the "interface descriptor" where next to the communication class descriptor a data class interface gets set up aswell. So i guess everything is set up as intended but when using the "send file" option in Tera term I'm getting a transfer speed of about 32kbit/s or was it 64kbit/s but not higher.

any help would be greatly appreciated