EmbeddedRelated.com
Forums

LPC2148: What endpoint(s) (bulk or isochronous) to choose for big amount of data ?

Started by Martin Maurer September 11, 2005
Hello,

excuse my questions which are more USB related than to LPC2148: I want to transfer some data from LPC2148 to PC. My data is a big amount of data. "Jitter" is no problem. In reverse direction (PC -> LPC2148) there is almost no throughput required. There are various endpoints to choose from in LPC2148. Which one should i choose for my application ?

Here are my current ideas:

I can't deal with lost packets, so i can't use isochronous packets. Is this right ?
Control and interrupt endpoints are slow, correct ?
But for big amount of data, it looks like the isochronous data packets are better, because the chunk itself can be 1023 bytes instead of only 64 bytes. Or are the small bulk packets transferred more often than the big iso packet, so throughput is the same ?
Can i use multiple bulk endpoints (e.g. i use physical 5, 11, 17, 23, 29 and 31) at the same time to increase throughput or is sum of throughput the same as using the endpoint sequential ? When i fire the different endpoints is there a guaranteed order of incoming packets, e.g. when i fire endpoint 5 and then 11, then 5 and then 11, do i received the packet 1,2,3,4 in same order ?

What throughput do i get at all, with and without using DMA ?

Regards and thanks for helping an USB newbie...

Martin



An Engineer's Guide to the LPC2100 Series

Hi,

> excuse my questions which are more USB related than to
> LPC2148: I want to transfer some data from LPC2148 to PC. My
> data is a big amount of data. "Jitter" is no problem. In
> reverse direction (PC -> LPC2148) there is almost no
> throughput required. There are various endpoints to choose
> from in LPC2148. Which one should i choose for my application ?
>
> Here are my current ideas:
>
> I can't deal with lost packets, so i can't use isochronous
> packets. Is this right ?

Isochronous packets are not guaranteed to be error free or even to make
it to the device.

> Control and interrupt endpoints are slow, correct ?

You won't be transferring huge amounts of data down a control endpoint.
Interrupt endpoints are just that and the retry happens in the next
period.

> But for big amount of data, it looks like the isochronous
> data packets are better, because the chunk itself can be 1023
> bytes instead of only 64 bytes.

It's true that iso transfers are up to 1023 bytes--however, there is no
retry on error. Isochronous endpoints are usually used for audio where
dropping a packet or a bad packet may not be the end of the world. If
you deal with iso packets, you'll probably want to know about USB frames
too.

> Or are the small bulk packets
> transferred more often than the big iso packet, so throughput
> is the same ?

You have to understand that IN transfers (device -> PC) are POLLED.
Your USB device can't send anything to the host unless it's been asked
to, and the token sent to ask the device whether it has anything to send
to the host comes around once in a while--defined by the device
descriptors. Hence, the descriptors you use will define the frequency
of the IN transactions. You'll need to read up on this.

> Can i use multiple bulk endpoints (e.g. i use physical 5, 11,
> 17, 23, 29 and 31) at the same time to increase throughput or
> is sum of throughput the same as using the endpoint
> sequential ?

Good question. The answer is that if your device has double buffering
for USB packets, throughput is enhanced as fewer NAK handshakes will be
sent. Using two endpoints would mean that you could theoretically send
two lots of data down to two endpoints and seemingly double your
throughput, but the packet arrival order (when comparing distinct
endpoints) is a function of the host stack.

> When i fire the different endpoints is there a
> guaranteed order of incoming packets, e.g. when i fire
> endpoint 5 and then 11, then 5 and then 11, do i received the
> packet 1,2,3,4 in same order ?

No, potentially not. The host stack might decide to do EP5 then 11, or
11 then 5, IIRC.

> What throughput do i get at all, with and without using DMA ?

No idea. Haven't tested it yet. However, with 64-byte packets, you
should be able to achieve a good throughput. I'm not convinced that DMA
is worth it on 64-byte packets even, and the LPC DMA controller looks
rather hairy for USB.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for MSP430, ARM, AVR and now MAXQ processors



On Sun, Sep 11, 2005 at 11:05:49PM +0200, Martin Maurer wrote:
> excuse my questions which are more USB related than to LPC2148: I want to transfer some data from LPC2148 to PC. My data is a big amount of data. "Jitter" is no problem. In reverse direction (PC -> LPC2148) there is almost no throughput required. There are various endpoints to choose from in LPC2148. Which one should i choose for my application ?

If you have large amounts of data to send fast, bulk is the only good choice,
and multiple endpoints won't help you. Double buffering will. DMA is unlikely
to be necessary - you will probably be limited by the USB bandwidth. Clyde

--
Clyde Stubbs | HI-TECH Software
Email: clyde@clyd... | Phone Fax
WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885
PGP: finger clyde@clyd... | AUS: +61 7 3552 7777 +61 7 3552 7778
---
HI-TECH C: compiling the real world.



Hello all,

My name is Vicky Gosar & i am mumbai(INDIA).
I am persueing a B.E project in the subject of Arm controllers.

I have just joined this group last week.

I have just started reading ARm core.
I now require guidance about how go about in getting mastery in the ARM controller.

CAN ANYBODY HELP ME OUT WITH THIS?
IF YES PLEASE REPLY ME BACK.

WAITING FOR REPLY

VICKY

Martin Maurer <mailingliste@mail...> wrote:
Hello,

excuse my questions which are more USB related than to LPC2148: I want to transfer some data from LPC2148 to PC. My data is a big amount of data. "Jitter" is no problem. In reverse direction (PC -> LPC2148) there is almost no throughput required. There are various endpoints to choose from in LPC2148. Which one should i choose for my application ?

Here are my current ideas:

I can't deal with lost packets, so i can't use isochronous packets. Is this right ?
Control and interrupt endpoints are slow, correct ?
But for big amount of data, it looks like the isochronous data packets are better, because the chunk itself can be 1023 bytes instead of only 64 bytes. Or are the small bulk packets transferred more often than the big iso packet, so throughput is the same ?
Can i use multiple bulk endpoints (e.g. i use physical 5, 11, 17, 23, 29 and 31) at the same time to increase throughput or is sum of throughput the same as using the endpoint sequential ? When i fire the different endpoints is there a guaranteed order of incoming packets, e.g. when i fire endpoint 5 and then 11, then 5 and then 11, do i received the packet 1,2,3,4 in same order ?

What throughput do i get at all, with and without using DMA ?

Regards and thanks for helping an USB newbie...

Martin ---------------------------------
YAHOO! GROUPS LINKS ---------------------------------

---------------------------------
Yahoo! India Matrimony: Find your partner now.



Hi,
In a past project I had to transmit a stream of uncompressed video via USB2. It was possible to transmit > 32MBytes per second using just one bulk
endpoint, bulk packets can be transmitted more often than isochronous.

Using several enpoints won't speed up the speed of transfer as all of them
have use the same USB.
_____

From: lpc2000@lpc2... [mailto:lpc2000@lpc2...] On Behalf Of
Martin Maurer
Sent: Sunday, September 11, 2005 11:06 PM
To: lpc2000@lpc2...
Subject: [lpc2000] LPC2148: What endpoint(s) (bulk or isochronous) to choose
for big amount of data ?
Hello,

excuse my questions which are more USB related than to LPC2148: I want to
transfer some data from LPC2148 to PC. My data is a big amount of data.
"Jitter" is no problem. In reverse direction (PC -> LPC2148) there is almost
no throughput required. There are various endpoints to choose from in
LPC2148. Which one should i choose for my application ?

Here are my current ideas:

I can't deal with lost packets, so i can't use isochronous packets. Is this
right ?
Control and interrupt endpoints are slow, correct ?
But for big amount of data, it looks like the isochronous data packets are
better, because the chunk itself can be 1023 bytes instead of only 64 bytes.
Or are the small bulk packets transferred more often than the big iso
packet, so throughput is the same ?
Can i use multiple bulk endpoints (e.g. i use physical 5, 11, 17, 23, 29 and
31) at the same time to increase throughput or is sum of throughput the same
as using the endpoint sequential ? When i fire the different endpoints is
there a guaranteed order of incoming packets, e.g. when i fire endpoint 5
and then 11, then 5 and then 11, do i received the packet 1,2,3,4 in same
order ?

What throughput do i get at all, with and without using DMA ?

Regards and thanks for helping an USB newbie...

Martin
_____

> Terms of Service.
_____