how to reduce wBytesPerInterval of bandwidth to fix "Not enough bandwidth for new device "

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

cross mob
juhu_4653696
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

hi,

Last time i issue a problem is :

https://community.cypress.com/t5/USB-Superspeed-Peripherals/ubuntu-host-cypress-Isochronous-mode-can...

but it closed, so i create a new question for continue debug.

Since i set:

 FX3_EP_ISO_VIDEO_SS_BURST 0x07
 FX3_EP_ISO_VIDEO_SS_MULT   0x01
 FX3_UVC_ISO_PAYLOAD_SIZE = ((FX3_EP_ISO_VIDEO_SS_BURST + 1) * (FX3_EP_ISO_VIDEO_SS_MULT + 1) * 1024) = (0x07+1)(0x01+1)*1024=16k

0x01, /* Servicing interval for data transfers */

It means cypress will report max palyload size is 16k, bandwidth is 16kB/125us *8= 1Gbps. and i capture usb package:

image.png

It is correct. Could  i reduce the bandwith further?

How i reduce the wBytesPerInterval and open camera successfully?

Thanks!

Jun

0 Likes
1 Solution

Hello Jun,

As mentioned earlier, the problem seems to be due to  the limitations from host controller. 

The video bandwidth for 800*600 @ 10fps can be around 9.1 MBps (considering 2 bytes per pixel)

means 8k and 250us , open 3 cameras successfully!

>> This means that the isochronous endpoint bandwidth is 32.7 MBps for single camera. This can support the video bandwidth and also the host controller is can support 3 cameras with the same bandwidth. In addition to this as the video bandwidth is less than the isochronous endpoint bandwidth i.e. the reason we do not see CyU3PDmaMultiChannelCommitBuffer Fail status = 71. When the USB host doesn't consume the data in the DMA buffers (filled by the sensor) of FX3, there can be DMA overflow condition which leads to CyU3PDmaMultiChannelCommitBuffer failure

means 8k and 125us, open 3 cameras will "show no space left"

>> This means that the isochronous endpoint bandwidth is 65.5 MBps for single camera

When the bandwidth is reduced the host controller supports 3 cameras but for streaming 1200*1200 more bandwidth will be required and it seems that the USB host controller is not able to allot the bandwidth for 3  camera

Regards,
Rashi

View solution in original post

0 Likes
10 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Jun,

Please share the currently used firmware.

As mentioned in the previous thread, reducing the FX3_EP_ISO_VIDEO_SS_BURST and FX3_EP_ISO_VIDEO_SS_MULT will reduce the bandwidth.

From the previous thread, I understand that you were able to stream when 2 camera were connected to the host. Is that correct?

Please let me know the requirement.

Regards,
Rashi
0 Likes

Hi Rashi,

Thank you for your replay!  You are right, we are able to stream 2 camera were connected to the host.

Attachment is firware, please review.

Regards,

Jun

0 Likes

Hello Jun,

From the thread description, I understand that 16KB (16384) is the payload size configured in the firmware and hence the wbytesPerInterval is 16384. To reduce the bytes per interval you can reduce FX3_EP_ISO_VIDEO_SS_BURST to 3 i.e.

FX3_EP_ISO_VIDEO_SS_BURST 0x03
 FX3_EP_ISO_VIDEO_SS_MULT   0x01
 FX3_UVC_ISO_PAYLOAD_SIZE = ((FX3_EP_ISO_VIDEO_SS_BURST + 1) * (FX3_EP_ISO_VIDEO_SS_MULT + 1) * 1024) = (0x03+1)(0x01+1)*1024=8KB

It is likely that you might see CyU3PDmaMultiChannelCommitBuffer Fail status = 71 when the above settings are used. This is because the host controller is slow to consume the data from FX3.

As mentioned in the earlier thread, the problem seems to be  the host controller as it is not able to allocate the bandwidth required for 3 cameras. You can try using BULK endpoint instead of isochronous endpoint or else connect the third camera to a different USB Host controller.

Please confirm if the video from 3 camera can be streamed successfully using the bulk endpoint.

Regards,
Rashi
0 Likes

Hi Rashi,

BULK mode is ok for 3 camera can be streamed, but we neeed change to isochronous mode in our project.

my question: if host controller is not able to allocate the bandwidth required for 3 cameras, why bulk mode is ok?

Other interesting test is:

1. set camera resolution to 800*600/10fps, the issue also exist.

As i understand, I reduce the camera resolution, is it means reducet the bandwidth? why host still report "no enough space left"?

Best Regards,

Jun

0 Likes

Hi Rashi,

"FX3_EP_ISO_VIDEO_SS_BURST 0x03
 FX3_EP_ISO_VIDEO_SS_MULT   0x01
 FX3_UVC_ISO_PAYLOAD_SIZE = ((FX3_EP_ISO_VIDEO_SS_BURST + 1) * (FX3_EP_ISO_VIDEO_SS_MULT + 1) * 1024) = (0x03+1)(0x01+1)*1024=8KB

It is likely that you might see CyU3PDmaMultiChannelCommitBuffer Fail status = 71 when the above settings are used. This is because the host controller is slow to consume the data from FX3. "

>>>>>>>>>>>>>>>>>>>>>> why i reduce the bytes per interval(8k), the host controller will slow to consume the data from FX3?  but use 16k, the host controller is ok ?

Jun

0 Likes

Hi Rashi,

good thing update (open 3 cameras with 800*600/10fps test): 

1. Set FX3_EP_ISO_VIDEO_SS_BURST 0x07

     FX3_EP_ISO_VIDEO_SS_MULT 0x01

     0x01, /* Servicing interval for data transfers */

     means 8k and 125us, open 3 cameras will "show no space left"

2. Set FX3_EP_ISO_VIDEO_SS_BURST 0x07

    FX3_EP_ISO_VIDEO_SS_MULT 0x01

    0x02, /* Servicing interval for data transfers */

    means 8k and 250us , open 3 cameras successfully!

It seems like  this setting is ok for 800*600 resolution cameras.

but for 1200*1200 resolution cameras, it maybe need continue to try setting.

Jun

0 Likes

Hello Jun,

As mentioned earlier, the problem seems to be due to  the limitations from host controller. 

The video bandwidth for 800*600 @ 10fps can be around 9.1 MBps (considering 2 bytes per pixel)

means 8k and 250us , open 3 cameras successfully!

>> This means that the isochronous endpoint bandwidth is 32.7 MBps for single camera. This can support the video bandwidth and also the host controller is can support 3 cameras with the same bandwidth. In addition to this as the video bandwidth is less than the isochronous endpoint bandwidth i.e. the reason we do not see CyU3PDmaMultiChannelCommitBuffer Fail status = 71. When the USB host doesn't consume the data in the DMA buffers (filled by the sensor) of FX3, there can be DMA overflow condition which leads to CyU3PDmaMultiChannelCommitBuffer failure

means 8k and 125us, open 3 cameras will "show no space left"

>> This means that the isochronous endpoint bandwidth is 65.5 MBps for single camera

When the bandwidth is reduced the host controller supports 3 cameras but for streaming 1200*1200 more bandwidth will be required and it seems that the USB host controller is not able to allot the bandwidth for 3  camera

Regards,
Rashi
0 Likes

Hi Regards,

I see, thanks for your explanation. I read 001-86947_AN86947_Optimizing_USB_3.0_Throughput_with_EZ-USB_FX3.pdf and find some conclusions as below:

“From the results, you can see that the isochronous throughput for Linux is less compared with Windows and Mac OS X. It is less because the Linux kernel restricts the size of the USB transfer to less than or equal to 32 KB. Therefore, the burst size and the ISO-Mult setting should be set in such a way that their product does not exceed 32 KB.”

Do you know where are "Linux kernel restricts the size of the USB transfer"? or we can modify kernel to try.

Jun

0 Likes

Hello,

From your earlier responses, we see that endpoint size is 8KB  i.e. 24 KB for 3 camera. which is less than 32 KB. But when service interval value is increased i.e. bandwidth is reduced the streaming is successful. So, the problem doesn't seems to be with the transfer size but it seems that Host controller is not able to allocate bandwidth requested by 3 cameras.

Please let me know if the streaming is successful when 3 cameras (with isochronous endpoint) are connected to a Windows PC. 

Regards,
Rashi
0 Likes

Hi Rashi,

I see. Thanks for your help!

Jun

0 Likes