How to send one Big packet with CyU3PDmaMultiChannelCommitBuffer

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

cross mob
xixu_4093676
Level 3
Level 3
25 replies posted 10 replies posted 10 questions asked

With AN75779 sample code, I try to transfer 17932 bytes with function CyU3PDmaMultiChannelCommitBuffer,

But the PC usb capture tools "Bus hound" show 17932 bytes packet been splited  two packets, one is 16384 and another is 1548.

Is it possilbie to disable the packet spilt?

I test it under USB2.0.

0 Likes
1 Solution

Hello Martin,

In USB SuperSpeed, the maximum size of a BULK transfer is 1024 bytes and it can support a burst of 16 packets. So, the transfer (>16KB data) is split into multiple transactions with the last transaction being a short packet.

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,

- What is the buffer size that is used in your firmware?

- The CyU3PDmaChannelCommitBuffer() API commits an entire buffer to the USB host. Depending on the USB bus speed, the transfer is split into multiple transactions each with a transfer size equal to the bMaxPcktSize parameter mentioned in the endpoint descriptor of the device firmware. So, for any transfer that is of size greater than the bMaxPcktSize parameter, it will be split into multiple transactions.

Best regards,

Srinath S

0 Likes

Hello,

in the uvc.h file

    CY_FX_EP_BULK_VIDEO_PKT_SIZE          0x400

    CY_FX_EP_BULK_VIDEO_PKT_COUNT      0x12   //change from 0x10 to 0x12

   By my underrstand, the buffer size  = 18*1024 = 18432

Martin,

0 Likes

Hello Martin,

In USB SuperSpeed, the maximum size of a BULK transfer is 1024 bytes and it can support a burst of 16 packets. So, the transfer (>16KB data) is split into multiple transactions with the last transaction being a short packet.

Best regards,

Srinath S

0 Likes