When the data length is not an integer multiple of block transfer data length, the USB will crash.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello.

I am using FX3 cy3014 to develop an image data acquisition and transmission device. The configuration mode is salvefifo mode, and the block transfer data length is 1024 bytes.

1) When USB is set to 1024 bytes blocks for transmission, the host computer uses beginDataXfer acquisition. If the data length is not an integer multiple of 1024 bytes, the USB will crash until the reset signal is sent or power-on is restored.

2) When the USB does not store the integer multiple data of 1024 bytes, the beginDataXfer acquisition is initiated (For example, the transmission rate is slow). BeginDataXfer will take precedence over data sending, and USB will also crash until reset or re-energize.

What are the reasons for these two phenomena and are there any solutions?

Thank you very much.

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

- I understand that your application uses both transmitting and receiving data from FX3. Please correct me if I am wrong.

- When reading data from the FX3, the data transfer API call will return in one of the following cases.

     1. When the requested data has been sent by FX3.

     2. When there is a short packet sent by FX3.

     3. When there is a zero-length packet sent by FX3.

The second and third condition is accomplished by the PKTEND# pin. When there is a short packet being sent by the GPIF II interface, it should either be wrapped up using the CyU3PDmaChannelSetWrapUp() API or the PKTEND# pin signalling.

Please follow these steps while sending data from FX3.

Can you please elaborate more on the failure that occurs when the data is transferred from the host to FX3?

Best regards,

Srinath S

View solution in original post

0 Likes
3 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

- I understand that your application uses both transmitting and receiving data from FX3. Please correct me if I am wrong.

- When reading data from the FX3, the data transfer API call will return in one of the following cases.

     1. When the requested data has been sent by FX3.

     2. When there is a short packet sent by FX3.

     3. When there is a zero-length packet sent by FX3.

The second and third condition is accomplished by the PKTEND# pin. When there is a short packet being sent by the GPIF II interface, it should either be wrapped up using the CyU3PDmaChannelSetWrapUp() API or the PKTEND# pin signalling.

Please follow these steps while sending data from FX3.

Can you please elaborate more on the failure that occurs when the data is transferred from the host to FX3?

Best regards,

Srinath S

0 Likes
Anonymous
Not applicable

Our USB device works in slavefifo mode, in which firmware only declares the size of cache and block transfer without special processing. Our problem is that when a computer accesses USB device data using beginxfer function, if the receiving design cache and firmware settings are inconsistent or the access speed is not matched, the connection failure will easily occur. When the USB device FIFO is in full state and the host computer receiving program is enabled, the data can be received normally.

0 Likes

Hello,

- I am not clear with your application. Can you please elaborate on "if the receiving design cache and firmware settings are inconsistent or the access speed is not matched, the connection failure will easily occur" ?

Best regards,

Srinath S

0 Likes