CyAPI.lib to FX3 Clarification

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

cross mob
Anonymous
Not applicable

I have a question about the CyAPI.lib and communication to the FX3. I understand that USB 3.0 splits bulk transfers into packets with payloads of 1024 bytes each. I also understand that when a partial payload, or empty payload is received the receiver (in my case the FX3) knows the bulk transfer is complete. I just want to make sure I understand how this is handled.

   

If I call XferData() from the CyAPI.lib on the host, and pass in a buffer of data to send that has more than 1024 bytes in it, will the CyAPI.lib automatically begin a bulk transfer, split the buffer into packets, and send an empty packet at the end?

   

Also, does this mean that the FX3 knows (or will know when it receives the empty packet), how long the buffer of data was that I passed in to XferData()?

0 Likes
1 Reply
Anonymous
Not applicable

Hi,

   

When you send 1024 Bytes or any other multiple of 1024 bytes (not equal to 16K), you need to send send a Zero length packet manually to indicate the transfer has ended.

   

CYAPI does not send this ZLP automatically.

   

Regards,

   

- Madhu Sudhan

0 Likes