Two last bytes missed in callback function (stream data)

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

Two last bytes missed in callback function (stream data)

Julio Cruz Barroso

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

 

 

 



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: Two last bytes missed in callback function (stream data)

Julio Cruz Barroso

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

 

 

 

 


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

 



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: Two last bytes missed in callback function (stream data)

Julio Cruz Barroso

Hi All,

 

I try to run the same testing in Windows using FTDI libraries in D2XX mode.

 

The results are similar in synchronous mode, every 510 bytes, data is missing.

 

-          At 4B/s there is no data missing.

-          At 4000B/s start missing 2 bytes every 510 bytes

-          At 5MB/s is missing 2 bytes every 510 bytes

 

The attached file show the FT2232H signals during every transmission (at 4B/s, 4000B/s and 5MB/s) and the source code including the initialization and read loop.

 

It seems that was not a problem in PC (libusb, libftdi, d2xx).

 

Has anyone had the same experience?

 

Regards

 

Julio

 

 

From: Julio Cruz Barroso
Sent: Friday, April 10, 2015 9:38 AM
To: [hidden email]
Subject: RE: Two last bytes missed in callback function (stream data)

 

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

 

 

 

 


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

 

 


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

 



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



FTDI - issue2 - windows.pdf (358K) Download Attachment
FTDI - issue2 - windows.c (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Two last bytes missed in callback function (stream data)

Ryan Tennill
Do the missing bytes show up at the start of the next transfer or are they completely missing? There are status bytes sent by some/most/all? the chips that would eat into the available payload space. I don't remember if libFTDI filters these bytes out or not.

ref: http://www.ftdichip.com/Support/Knowledgebase/index.html?an232b_04smalldataend.htm
ref: https://code.google.com/p/usb-serial-for-android/issues/detail?id=4

Ryan

On 04/10/2015 06:26 AM, Julio Cruz Barroso wrote:

Hi All,

 

I try to run the same testing in Windows using FTDI libraries in D2XX mode.

 

The results are similar in synchronous mode, every 510 bytes, data is missing.

 

-          At 4B/s there is no data missing.

-          At 4000B/s start missing 2 bytes every 510 bytes

-          At 5MB/s is missing 2 bytes every 510 bytes

 

The attached file show the FT2232H signals during every transmission (at 4B/s, 4000B/s and 5MB/s) and the source code including the initialization and read loop.

 

It seems that was not a problem in PC (libusb, libftdi, d2xx).

 

Has anyone had the same experience?

 

Regards

 

Julio

 

 

From: Julio Cruz Barroso
Sent: Friday, April 10, 2015 9:38 AM
To: [hidden email]
Subject: RE: Two last bytes missed in callback function (stream data)

 

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

<img moz-do-not-send="true" id="Picture_x0020_1" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.2?part=&amp;filename=image001.png" border="0" height="266" width="459">

 

<img moz-do-not-send="true" id="Picture_x0020_2" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.3?part=&amp;filename=image002.png" border="0" height="249" width="549">

<img moz-do-not-send="true" id="Picture_x0020_3" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.4?part=&amp;filename=image003.png" border="0" height="329" width="594">

<img moz-do-not-send="true" id="Picture_x0020_4" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.5?part=&amp;filename=image004.png" border="0" height="297" width="563">

 

 

 


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

 

 


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

 



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



-- 

217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


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: Two last bytes missed in callback function (stream data)

Julio Cruz Barroso
Ryan,

The answers at the same order:

- No show up at the start of the next transfer. They are missing completely when the package size is 512 (including the status)
- All the package have the status bytes: 0x32 0x60.
- linFTDI filter the status bytes correctly.

Thanks

Julio

On Apr 10, 2015, at 11:05 PM, Ryan Tennill <[hidden email]> wrote:

Do the missing bytes show up at the start of the next transfer or are they completely missing? There are status bytes sent by some/most/all? the chips that would eat into the available payload space. I don't remember if libFTDI filters these bytes out or not.

ref: http://www.ftdichip.com/Support/Knowledgebase/index.html?an232b_04smalldataend.htm
ref: https://code.google.com/p/usb-serial-for-android/issues/detail?id=4

Ryan

On 04/10/2015 06:26 AM, Julio Cruz Barroso wrote:

Hi All,

 

I try to run the same testing in Windows using FTDI libraries in D2XX mode.

 

The results are similar in synchronous mode, every 510 bytes, data is missing.

 

-          At 4B/s there is no data missing.

-          At 4000B/s start missing 2 bytes every 510 bytes

-          At 5MB/s is missing 2 bytes every 510 bytes

 

The attached file show the FT2232H signals during every transmission (at 4B/s, 4000B/s and 5MB/s) and the source code including the initialization and read loop.

 

It seems that was not a problem in PC (libusb, libftdi, d2xx).

 

Has anyone had the same experience?

 

Regards

 

Julio

 

 

From: Julio Cruz Barroso
Sent: Friday, April 10, 2015 9:38 AM
To: [hidden email]
Subject: RE: Two last bytes missed in callback function (stream data)

 

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

<img moz-do-not-send="true" id="Picture_x0020_1" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.2?part=&amp;filename=image001.png" border="0" height="266" width="459">

 

<img moz-do-not-send="true" id="Picture_x0020_2" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.3?part=&amp;filename=image002.png" border="0" height="249" width="549">

<img moz-do-not-send="true" id="Picture_x0020_3" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.4?part=&amp;filename=image003.png" border="0" height="329" width="594">

<img moz-do-not-send="true" id="Picture_x0020_4" src="imap://smtp%40jupiter%2Edistantfocus%2Ecom@jupiter.distantfocus.com:993/fetch%3EUID%3E/Drafts%3E4022?header=quotebody/;section=1.5?part=&amp;filename=image004.png" border="0" height="297" width="563">

 

 

 


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

 

 


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

 



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



-- 

217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


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




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: Two last bytes missed in callback function (stream data)

E.S. Rosenberg
Have you tried what the kernel-driver 'sees'? (ie. /dev/ttyUSBX instead of libftdi)

HTH,
Eli

2015-04-11 3:23 GMT+03:00 Julio Cruz Barroso <[hidden email]>:
Ryan,

The answers at the same order:

- No show up at the start of the next transfer. They are missing completely when the package size is 512 (including the status)
- All the package have the status bytes: 0x32 0x60.
- linFTDI filter the status bytes correctly.

Thanks

Julio

On Apr 10, 2015, at 11:05 PM, Ryan Tennill <[hidden email]> wrote:

Do the missing bytes show up at the start of the next transfer or are they completely missing? There are status bytes sent by some/most/all? the chips that would eat into the available payload space. I don't remember if libFTDI filters these bytes out or not.

ref: http://www.ftdichip.com/Support/Knowledgebase/index.html?an232b_04smalldataend.htm
ref: https://code.google.com/p/usb-serial-for-android/issues/detail?id=4

Ryan

On 04/10/2015 06:26 AM, Julio Cruz Barroso wrote:

Hi All,

 

I try to run the same testing in Windows using FTDI libraries in D2XX mode.

 

The results are similar in synchronous mode, every 510 bytes, data is missing.

 

-          At 4B/s there is no data missing.

-          At 4000B/s start missing 2 bytes every 510 bytes

-          At 5MB/s is missing 2 bytes every 510 bytes

 

The attached file show the FT2232H signals during every transmission (at 4B/s, 4000B/s and 5MB/s) and the source code including the initialization and read loop.

 

It seems that was not a problem in PC (libusb, libftdi, d2xx).

 

Has anyone had the same experience?

 

Regards

 

Julio

 

 

From: Julio Cruz Barroso
Sent: Friday, April 10, 2015 9:38 AM
To: [hidden email]
Subject: RE: Two last bytes missed in callback function (stream data)

 

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

 

 

 

 


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

 

 


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

 



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



-- 

<a href="tel:217-351-2655%20ext.%20126" value="+12173512655" target="_blank">217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/


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




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





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: Two last bytes missed in callback function (stream data)

Julio Cruz Barroso

Hi Eli,

 

Thanks for your suggestion. I will try that.

 

JC

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of E.S. Rosenberg
Sent: Sunday, April 12, 2015 10:59 PM
To: [hidden email]
Subject: Re: Two last bytes missed in callback function (stream data)

 

Have you tried what the kernel-driver 'sees'? (ie. /dev/ttyUSBX instead of libftdi)

HTH,

Eli

 

2015-04-11 3:23 GMT+03:00 Julio Cruz Barroso <[hidden email]>:

Ryan,

 

The answers at the same order:

 

- No show up at the start of the next transfer. They are missing completely when the package size is 512 (including the status)

- All the package have the status bytes: 0x32 0x60.

- linFTDI filter the status bytes correctly.

 

Thanks

 

Julio


On Apr 10, 2015, at 11:05 PM, Ryan Tennill <[hidden email]> wrote:

Do the missing bytes show up at the start of the next transfer or are they completely missing? There are status bytes sent by some/most/all? the chips that would eat into the available payload space. I don't remember if libFTDI filters these bytes out or not.

ref: http://www.ftdichip.com/Support/Knowledgebase/index.html?an232b_04smalldataend.htm
ref: https://code.google.com/p/usb-serial-for-android/issues/detail?id=4

Ryan

On 04/10/2015 06:26 AM, Julio Cruz Barroso wrote:

Hi All,

 

I try to run the same testing in Windows using FTDI libraries in D2XX mode.

 

The results are similar in synchronous mode, every 510 bytes, data is missing.

 

-          At 4B/s there is no data missing.

-          At 4000B/s start missing 2 bytes every 510 bytes

-          At 5MB/s is missing 2 bytes every 510 bytes

 

The attached file show the FT2232H signals during every transmission (at 4B/s, 4000B/s and 5MB/s) and the source code including the initialization and read loop.

 

It seems that was not a problem in PC (libusb, libftdi, d2xx).

 

Has anyone had the same experience?

 

Regards

 

Julio

 

 

From: Julio Cruz Barroso
Sent: Friday, April 10, 2015 9:38 AM
To: [hidden email]
Subject: RE: Two last bytes missed in callback function (stream data)

 

Hi all,

 

In my previous email, I switched (my mistake in the text) synchronous and asynchronous mode!. In fact, the system is working in asynchronous mode (10MB/s) and is missing two bytes in synchronous mode.

 

Julio

 

From: Julio Cruz Barroso
Sent: Thursday, April 09, 2015 10:21 PM
To: [hidden email]
Subject: Two last bytes missed in callback function (stream data)

 

Dears,

 

Currently, I have a system running a FTDI in synchronous mode. It contain a FPGA sending data to the PC using a FT2232H (please, refer to diagram below).

 

Basically, the speed is controlled by a signal generator connected to an input of the FPGA. In this case, the throughput could be change easily for testing purposes.

 

The maximum transmission speed is around 10MB/s in this synchronous mode. However, in asynchronous mode there is data missing as explain below using three (3) different speeds (please, refer to next 3 figures):

 

1.       The figure 1 shows the data received in the callback function. In this case, the size is 4 bytes. No data is missing.

2.       The figure 2 shows a higher speed. In this case, the data size in the callback function is 40 bytes. No data is missing.

3.       The figure 3 shows another speed with a buffer size of 510 byte. After this speed, all the size buffer are the same (510 bytes) and there is always two bytes missing (in the end of the buffer).

 

I tried changing the number of transfers and size without success.

 

Any suggestions?

 

Thanks

 

Julio

 

 

 

 

 


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

 

 


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

 

 


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

 



-- 
 
<a href="tel:217-351-2655%20ext.%20126" target="_blank">217-351-2655 ext. 126
Distant Focus Corporation
4114B Fieldstone Rd
Champaign, IL 61822
http://jupiter.distantfocus.com/projects/

 


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

 

 


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

 

 

 


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

 


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

Loading...