EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

USB transfer rate LPC17xx

Started by navman May 14, 2011
Hi,
We are designing a device which needs to transfer data to a PC over USB
continuously. We plan to use the LPC1768 Cortex-M3 processor for this
application. We would like some opinion on the best approach for the USB
class implementation. We are looking at about 400Kbytes/sec sustainable
transfer rate between the device to PC. The reverse traffic will be quite
lean. 

We were thinking of using the USB CDC since it uses bulk transfers & hence
could provide good throughputs. Has anyone tried measuring the max.
throughputs using the USB CDC driver? Your opinions would be most
appreciated. 

	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
On May 14, 9:12=A0am, "navman" <naveen_pn@n_o_s_p_a_m.yahoo.com> wrote:
> Hi, > We are designing a device which needs to transfer data to a PC over USB > continuously. We plan to use the LPC1768 Cortex-M3 processor for this > application. We would like some opinion on the best approach for the USB > class implementation. We are looking at about 400Kbytes/sec sustainable > transfer rate between the device to PC. The reverse traffic will be quite > lean.
We get over 500KB/s with a 32mHz PIC24, so M3 should be doable. However, we are using asynchronous ACK/NAK protocols.
> > We were thinking of using the USB CDC since it uses bulk transfers & henc=
e
> could provide good throughputs. Has anyone tried measuring the max. > throughputs using the USB CDC driver? Your opinions would be most > appreciated.
CDC VCP management on the PC is a mess. Just use bulk transfers directly with Async. ACK/NAK.
On 14/05/2011 17:29, linnix wrote:
> On May 14, 9:12 am, "navman"<naveen_pn@n_o_s_p_a_m.yahoo.com> wrote: >> Hi, >> We are designing a device which needs to transfer data to a PC over USB >> continuously. We plan to use the LPC1768 Cortex-M3 processor for this >> application. We would like some opinion on the best approach for the USB >> class implementation. We are looking at about 400Kbytes/sec sustainable >> transfer rate between the device to PC. The reverse traffic will be quite >> lean. > > We get over 500KB/s with a 32mHz PIC24, so M3 should be doable. > However, we are using asynchronous ACK/NAK protocols.
I don't think that you mean that do you? USB 2.0 high speed can manage a maximum 480Mbps but the actual rate is less allowing for turn-arounds, inter-packet gaps, etc. Andrew
On 14/05/2011 17:12, navman wrote:
> Hi, > We are designing a device which needs to transfer data to a PC over USB > continuously. We plan to use the LPC1768 Cortex-M3 processor for this > application. We would like some opinion on the best approach for the USB > class implementation. We are looking at about 400Kbytes/sec sustainable > transfer rate between the device to PC. The reverse traffic will be quite > lean. > > We were thinking of using the USB CDC since it uses bulk transfers& hence > could provide good throughputs. Has anyone tried measuring the max. > throughputs using the USB CDC driver? Your opinions would be most > appreciated.
I've achieved 120Mbps through an RNDIS device to a PC and > ~200Mbps with a custom bulk driver (FX2LP). This is /roughly/ equivalent to CDC. However 400kbytes/second isn't physically possible on a high-speed USB 2.0 device: the maximum is 480Mbps. What is your actual transfer speed requirement? Andrew
On 14/05/2011 22:39, Andrew Jackson wrote:
> On 14/05/2011 17:12, navman wrote: >> Hi, >> We are designing a device which needs to transfer data to a PC over USB >> continuously. We plan to use the LPC1768 Cortex-M3 processor for this >> application. We would like some opinion on the best approach for the USB >> class implementation. We are looking at about 400Kbytes/sec sustainable >> transfer rate between the device to PC. The reverse traffic will be quite >> lean. >> >> We were thinking of using the USB CDC since it uses bulk transfers& hence >> could provide good throughputs. Has anyone tried measuring the max. >> throughputs using the USB CDC driver? Your opinions would be most >> appreciated. > > I've achieved 120Mbps through an RNDIS device to a PC and > ~200Mbps > with a custom bulk driver (FX2LP). This is /roughly/ equivalent to CDC. > However 400kbytes/second isn't physically possible on a high-speed USB > 2.0 device: the maximum is 480Mbps. What is your actual transfer speed > requirement?
Sorry that'll teach me not to reply last thing at night. 400KBps = 3200kbps = 3.2Mbps so well within USB 2.0 capabilities! Andrew
> However 400kbytes/second isn't physically possible on a high-speed
USB
> 2.0 device: the maximum is 480Mbps. What is your actual transfer speed > requirement? > > Andrew
Seems like you may have read some decimal points or scale factors in the wrong place. At first blush the 400Kbytes/sec multiplies out to 3.3Mbits/sec, which even considering that framing and handshaking overhead is not considered, is a whole lot lower than the max rate of Full speed port then yet the High speed port. -- Michael Karas Carousel Design Solutions http://www.carousel-design.com
Unfortunately, we do not have time to play around with the USB driver code
(both on LPC17xx side and PC side) and have to live with whatever examples
we have from NXP, LPCexpross & such as we need to focus more on the
application which is huge. So can you guys share some information on
practical achievable transfer speeds from LPC to PC using USB CDC class
drivers? 	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
On May 15, 11:46=A0pm, "navman" <naveen_pn@n_o_s_p_a_m.yahoo.com> wrote:
> Unfortunately, we do not have time to play around with the USB driver cod=
e
> (both on LPC17xx side and PC side) and have to live with whatever example=
s
> we have from NXP, LPCexpross & such as we need to focus more on the > application which is huge. So can you guys share some information on > practical achievable transfer speeds from LPC to PC using USB CDC class > drivers? =A0 =A0 =A0 =A0 =A0
It depends on your implementations. Yes, CDC allows networking layers; for example: ATM over USB. However, they are usually very specific to the applications. I have not seen any general CDC NET example from Atmel, Microchip or NXP. Most of the CDC examples are tied to the serial port. So, you are pretty much on your own with CDC NET. That's why we pick ADB over USB. At least there are existing drivers for Linux and Window, and the basic protocols are well defined and published. However, as always, there are issues for the final 10% of implementations.

The 2024 Embedded Online Conference