Quantcast

FT245R transfer rates

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FT245R transfer rates

Jan Wilmans
Hi,

I'm using a FT245R in my design and I'm seeing fairly low transfer rates;
What I'm seeing on the FT245 side, is that RXF# is high most of the time, so it looks like
the host is not sending enough data / not fast enough or in too many short packets.

What I was wondering: the FT245R datasheet claims (quote:) "Data transfer rates up to 1Mbyte / second."

But, since it is a fullspeed device (1ms frames) and it has 128 byte receive buffer,
I figure the maximum tranfer rate is limited to 1000x 128 bytes per second? (equal 125Kb/s)

In other words: the receive buffer can be filled with at most 128 bytes every 1ms...

How is the 1 MB/s even theoretically possible with a 128 byte receive buffer?

Greetings,

Jan Wilmans




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Xiaofan Chen
On Mon, Feb 22, 2010 at 6:27 PM, Jan Wilmans <[hidden email]> wrote:

> What I was wondering: the FT245R datasheet claims (quote:) "Data transfer
> rates up to 1Mbyte / second."
>
> But, since it is a fullspeed device (1ms frames) and it has 128 byte receive
> buffer, I figure the maximum tranfer rate is limited to 1000x 128 bytes per
> second? (equal 125Kb/s)
>
> In other words: the receive buffer can be filled with at most 128 bytes
> every 1ms...
>
> How is the 1 MB/s even theoretically possible with a 128 byte receive

I have not read into the details of FT245R but here is my answer to
your question based on my understanding of USB. Sorry I have
not yet read the datasheet.

For bulk transfer (FTDI device uses bulk transfer in most cases), you
can have multiple packets (up to 64Bytes for full speed bulk endpoint)
per transfer, actually up to 19 for full speed USB. So the theoretically
the maximum transfer rate for full speed USB bulk transfer is
19x64=1216 Bytes/ms.

FT245R's receive buffer is double the max packet size (64x2=128) and
the transmit buffer is quad the max packet size (64x4=256). So it can
approach the maximum transfer rate limit of Full Speed Bulk Endpoint.
The driver of course need to be able to sustaining the data rate. So
FTDI has its own driver and not use Windows' lousy usbser.sys driver.

--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Jan Wilmans
Xiaofan,

thanks for your reply,

can have multiple packets (up to 64Bytes for full speed bulk endpoint)
per transfer, actually up to 19 for full speed USB. So the theoretically
the maximum transfer rate for full speed USB bulk transfer is
19x64=1216 Bytes/ms.

FT245R's receive buffer is double the max packet size (64x2=128) and
the transmit buffer is quad the max packet size (64x4=256). So it can
approach the maximum transfer rate limit of Full Speed Bulk Endpoint.
The driver of course need to be able to sustaining the data rate. So
FTDI has its own driver and not use Windows' lousy usbser.sys driver.

Basically what you are saying is that in the: "Data transfer rates up to 1Mbyte / second."
what they mean is 125Kb/s downspeed (host -> FT245 data transfer) and 250Kb/s upspeed (FT245 -> host data transfer) = ~~ 1Mb/s (actually 750 Kb/s) ??

So you agree that when looking at the speed of data in one direction only (host -> FT245R transfers) the
speeds is indeed only 125 Kb/s ?

Or am I mis-interpreting?

Greetings,

Jan Wilmans



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Xiaofan Chen
On Mon, Feb 22, 2010 at 9:02 PM, Jan Wilmans <[hidden email]> wrote:

> Basically what you are saying is that in the: "Data transfer rates up to
> 1Mbyte / second."

That is either direction.

> what they mean is 125Kb/s downspeed (host -> FT245 data transfer) and
> 250Kb/s upspeed (FT245 -> host data transfer) = ~~ 1Mb/s (actually 750 Kb/s)
> ??
>
> So you agree that when looking at the speed of data in one direction only
> (host -> FT245R transfers) the speeds is indeed only 125 Kb/s ?

No I mean it can reach 1MBytes/second either direction. 1216KBytes
per second is the theoretical limit but there are some overheads.

I do not know where you get this 250kb/s and 750kb/s thingy. 1Bytes=8bits.
So 1MBytes/s = 8000 kb/s.

--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Jan Wilmans
No I mean it can reach 1MBytes/second either direction. 1216KBytes
per second is the theoretical limit but there are some overheads.

the 250kb/s thingy is simple: 1ms frames, 256 byte send buffer on the FT245

4 packets can be send to the FT245 every ms, so 256 bytes per ms.
1000 x 256 = 256000 bytes per seconds, 256000/1024 = 250 Kb/s

But what I think you mean is: data is being read from the FT245 simulatiously, 
so whilest packets arrive, the receive buffer is being read and more then 4 packets (up to 19 is the hardware reads fast enough) can be send in 1 ms?

Greetings,

Jan Wilmans




libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Xiaofan Chen
On Mon, Feb 22, 2010 at 10:08 PM, Jan Wilmans <[hidden email]> wrote:

> But what I think you mean is: data is being read from the FT245
> simulatiously,
> so whilest packets arrive, the receive buffer is being read and more then 4
> packets (up to 19 is the hardware reads fast enough) can be send in 1 ms?
> Greetings,

I do not know how the internal of FT245R works. But for USB bulk transfer
multiple (up to 19) packets (each packer is 64Bytes max for full speed bulk
endpoint) can be done in one transfer (1 frame, 1ms).

I can imagine the following.
The receive buffer can hold two 64bytes packets, each frame (1ms)
 they can receive up to 19 USB packets of 64bytes (9 x full
128 byets full buffer plus one 64 bytes partial buffer) in theory.
In reality, maybe it is less. And there are some overhead involved.

--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Xiaofan Chen
On Mon, Feb 22, 2010 at 10:16 PM, Xiaofan Chen <[hidden email]> wrote:

> On Mon, Feb 22, 2010 at 10:08 PM, Jan Wilmans <[hidden email]> wrote:
>
>> But what I think you mean is: data is being read from the FT245
>> simulatiously,
>> so whilest packets arrive, the receive buffer is being read and more then 4
>> packets (up to 19 is the hardware reads fast enough) can be send in 1 ms?
>> Greetings,
>
> I do not know how the internal of FT245R works. But for USB bulk transfer
> multiple (up to 19) packets (each packer is 64Bytes max for full speed bulk
> endpoint) can be done in one transfer (1 frame, 1ms).
>
> I can imagine the following.
> The receive buffer can hold two 64bytes packets, each frame (1ms)
>  they can receive up to 19 USB packets of 64bytes (9 x full
> 128 byets full buffer plus one 64 bytes partial buffer) in theory.
> In reality, maybe it is less. And there are some overhead involved.
>

To put it this way, the USB SIE is fast enough (up to 1216 bytes/ms),
if the FIFO engine is fast enough, then it can transmit and receive
what the USB SIE is capable of.

In reality the data rate is lower due to some overhead and some
internal latency of the chip. The driver plays a big part as well.
http://www.ftdichip.com/Documents/AppNotes.htm
http://www.ftdichip.com/Documents/AppNotes/AN232B-03_D2XXDataThroughput.pdf
http://www.ftdichip.com/Documents/AppNotes/AN232B-04_DataLatencyFlow.pdf


--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Jan Wilmans
Yes, I understand, but to actually be able to receive 9 full buffers, the hardware reading from the FT245 must
read the data faster (or at least as fast) then it is arriving over USB, otherwise the buffer will be full and no more data can be received.

My assumption was, and I see how I was wrong about that now, that the hardware would never be reading that fast. And so I assumed that there 
could never arrive more then one buffersize of data per millisecond.

Thanks, for the links.

Greetings,

Jan


On 22 February 2010 15:24, Xiaofan Chen <[hidden email]> wrote:
On Mon, Feb 22, 2010 at 10:16 PM, Xiaofan Chen <[hidden email]> wrote:
> On Mon, Feb 22, 2010 at 10:08 PM, Jan Wilmans <[hidden email]> wrote:
>
>> But what I think you mean is: data is being read from the FT245
>> simulatiously,
>> so whilest packets arrive, the receive buffer is being read and more then 4
>> packets (up to 19 is the hardware reads fast enough) can be send in 1 ms?
>> Greetings,
>
> I do not know how the internal of FT245R works. But for USB bulk transfer
> multiple (up to 19) packets (each packer is 64Bytes max for full speed bulk
> endpoint) can be done in one transfer (1 frame, 1ms).
>
> I can imagine the following.
> The receive buffer can hold two 64bytes packets, each frame (1ms)
>  they can receive up to 19 USB packets of 64bytes (9 x full
> 128 byets full buffer plus one 64 bytes partial buffer) in theory.
> In reality, maybe it is less. And there are some overhead involved.
>

To put it this way, the USB SIE is fast enough (up to 1216 bytes/ms),
if the FIFO engine is fast enough, then it can transmit and receive
what the USB SIE is capable of.

In reality the data rate is lower due to some overhead and some
internal latency of the chip. The driver plays a big part as well.
http://www.ftdichip.com/Documents/AppNotes.htm
http://www.ftdichip.com/Documents/AppNotes/AN232B-03_D2XXDataThroughput.pdf
http://www.ftdichip.com/Documents/AppNotes/AN232B-04_DataLatencyFlow.pdf


--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]




--
Met vriendelijke groeten,


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FT245R transfer rates

Xiaofan Chen
On Mon, Feb 22, 2010 at 10:39 PM, Jan Wilmans <[hidden email]> wrote:
> Yes, I understand, but to actually be able to receive 9 full buffers, the
> hardware reading from the FT245 must
> read the data faster (or at least as fast) then it is arriving over USB,
> otherwise the buffer will be full and no more data can be received.

That is right.

> My assumption was, and I see how I was wrong about that now, that the
> hardware would never be reading that fast. And so I assumed that there
> could never arrive more then one buffersize of data per millisecond.

It all depends on the FIFO engine (or CPUs for other USB MCUs).

Here are some good explanations of USB transfer throughput
by Tsuneo, a real USB experts. Read his posts in the full thread as well
to understand how the host and driver play a part as well.
http://www.microchip.com/forums/fb.aspx?m=470017


--
Xiaofan http://mcuee.blogspot.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...