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

USB superspeed peripherals Forum Discussions

kir_4703346
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

With Firmware built using Cypress FX3 SDK  version 1.3.4  MJPEG  frames are corrupted when selecting UVC controls.

Works fine with firmware built using Cypress FX3 SDK version 1.3.1 

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

Hello,

From the attachment it seems that the behavior is seen due to concurrent control IN and bulk in transfer mentioned in point 2- part IV of section 2.3 of FX3 troubleshooting guide in FX3 SDK 1.3.4.

Please share the USB traces using Wireshark (.pcap) and UART debug prints  when the issue is seen. This will help us to confirm the problem.

To confirm if the firmware is build using SDK 1.3.4 please confirm if the build variable of the project is changed to 1_3_4

Regards,
Rashi
0 Likes
kir_4703346
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

https://community.cypress.com/t5/USB-Superspeed-Peripherals/CYUSB3013-low-control-read-performance-w...

As described in FX3_SDK_TroubleShooting_Guide provided with the FX3 SDK, Section 2.3, Part IV.

The low performance of the CyU3PUsbSendEP0Data() is because, the other IN (BULK,ISO, INTERRUPT) endpoints need to be suspended so that the the data over the control endpoint doesn't get corrupted due to premature data fetching from the DMA channel and was included from SDK version 1.3.2 onwards.

As a workaround you could implement the following snippet of code instead of CyU3PUsbSendEP0Data():

               extern CyU3PDmaChannel glUibChHandle;                    /* In channel handle for ep0 */

                    extern CyU3PReturnStatus_t                                       /* declaration of DmaChannelSendData */

                    CyU3PDmaChannelSendData (

                                 CyU3PDmaChannel *handle,

                                 uint8_t         *buffer,

                                 uint16_t         count);

In the vendor command that you are using, replace CyU3PUsbSendEP0Data() with the below two lines:

               CyU3PDmaChannelSendData (&glUibChHandle, glEp0Buffer, wLength);               /* use instead of CyU3PUsbSendEP0Data*/

               CyU3PUsbAckSetup ();                                                                                              /*important to ack the request from host*/

Using CyU3PDmaChannelSendData  instead of CyU3PUsbSendEP0Data for handling UVC controls GET request. UVC control is crashed but return status is SUCCESS 

0 Likes

Hello,

Using CyU3PDmaChannelSendData  instead of CyU3PUsbSendEP0Data for handling UVC controls GET request. UVC control is crashed but return status is SUCCESS 

>> Can you please share the USB traces using Wireshark for us to check and understand the problem better

Please let me know what happens when the control transfer fails/crashes. Does the streaming stop completely?

Regards,
Rashi
0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted
0 Likes
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted
0 Likes