LPCOpen - CDC and Custom class

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

LPCOpen - CDC and Custom class

734 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjarnjak on Tue May 21 06:35:40 MST 2013
I have posted on lpcware but that forum seems almost dead while this one is active.....so my original post:

http://www.lpcware.com/content/forum/lpc11u35-and-custom-class

From that time I had:

1. Succesfully made USB CDC running on LPC11U14 board from EA using LPCOpen. I increased endpoint size to 64 bytes and not kept it at 16.

2. Succesfully ported device bandwidth test from nxpUSBLib v0.98 to run under LPCOpen.

I noticed two things:

1. When device bandwidth test PC application starts, it detects LPC11U14 only as low speed device. Also, there is no memory storage drive present on my system when LPC11U14 runs.

2. When I run USB CDC demo, I modified the firmware so I am filling in a buffer and when a newline (\n) is detected firmware processes the buffer in way that it sends it back to the PC host and clears the buffer.

3. I made a C# application that sends few words and new line and counts number of bytes received. It takes start time and when 10KB (kilo bytes) of data are received it takes end time and reports the difference. Difference is 17 seconds which is about 600 bytes/sec transfer rate - which is way too slow.

Any idea why this is happening? I would need much higher transfer speeds since I will be doing a simple ADC DAQ device. I would be happy with standard 115200 but 600 bytes/sec is way too slow.

As a side note, I may go by using RS485 over UART if I can't go to higher speed but I see that people are having problems with UART FIFO's on other threads I have read....
0 Kudos
Reply
4 Replies

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Wed May 22 05:42:28 MST 2013
What is your level on the USB_CONNECT (GPIO0_6) during enumeration by the host?
0 Kudos
Reply

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjarnjak on Wed May 22 04:06:06 MST 2013

Quote: Serge
Do you have a pullup resistor on the USBDP line? Since this resistor is used to determine if you have a high speed device on enumeration. A pullup resistor on the USBDM line marks a low speed device.



I am using LPC11U14 board from Embedded Artists.
0 Kudos
Reply

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Tue May 21 23:46:28 MST 2013

Quote:
When device bandwidth test PC application starts, it detects LPC11U14 only as low speed device


Do you have a pullup resistor on the USBDP line? Since this resistor is used to determine if you have a high speed device on enumeration. A pullup resistor on the USBDM line marks a low speed device.
0 Kudos
Reply

697 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Tue May 21 11:59:34 MST 2013

Quote:
1. When device bandwidth test PC application starts, it detects LPC11U14 only as low speed device.


The USB device engine (SIE) on LPC11U14 supports just full-speed (12M bps). Low-speed (1.5M bps) is not available. I don't see the code of bandwidth test yet, it sounds like simple bug on the message text.


Quote:
I would need much higher transfer speeds


A short transaction (packet), less than 64 bytes, terminates a transfer.
And then, your device should wait for the start of next transfer until the next USB frame.

To get greater transfer speed on CDC, keep the packet size in 64 bytes.
The ADC data is stored to a cyclic buffer once. When the buffer holds 64 bytes or more, a 64 bytes packet is sent to the IN endpoint.

ADC --> cyclic buffer --> IN endpoint


Quote:
I may go by using RS485 over UART if I can't go to higher speed


Or, high-speed (480M bps) USB on LPC18xx.

Tsuneo
0 Kudos
Reply