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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by m.yzb on Thu Nov 21 01:52:19 MST 2013
Hello,

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

~myzb
Labels (1)
0 Kudos
Reply
1 Reply

1,673 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tinyusb on Fri Nov 22 10:01:41 MST 2013
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.

It is probably something else, in my test with lpc4357 (mass storage class) the chunk of 8k is transmitted in 398.334 us (micro second), which is ~ 8192 Byte / 398.334 = 20.56 Byte/us = 164.52 Mbps which is pretty high.
[img]http://www.lpcware.com/system/files/lpc4357_bulk_0.png[/img]

My best guess is windows CDC driver, for windows this is a serial device which may be imposed to a certain speed restriction (e.g 9600, 115200 etc). It may be something else such as you are trying to printf/echo while receiving the data ?
0 Kudos
Reply