cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

kir_4703346
New Contributor II

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

//UvcAppDebugPrint(4," %d", WrBuff);
status = CyU3PDmaChannelSendData(&glUibChHandle, (uint8_t*)&WrBuff, CX3_UVC_VC_LEN_VALUE_WORD);
CyU3PDebugPrint(4,"\n\r Send EP0 Data failed------------- = 0x%x", status);
//status = CyU3PUsbSendEP0Data(CX3_UVC_VC_LEN_VALUE_WORD,(uint8_t*)&WrBuff);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint(4,"\n\r Send EP0 Data failed = 0x%X", status);
}
Replaced CyU3PUsbSendEP0Data to CyU3PDmaChannelSendData as mentioned in the above link.  Used for handling  GET request from host. API returns success but the UVC control gets disabled.

0 Likes
1 Solution
Hemanth
Moderator
Moderator

Hi,

Instead of  using CyU3PDmaChannelSendData() please test using CyU3PUsbSendEP0Data() itself - but along with this the following API needs to be used - CyU3PUsbSetEpSuspDisableMask() API (refer 5.36.7.52 of FX3 API guide) - which skips suspend of USB IN endpoints (as per the mask chosen).

But please note that by using CyU3PUsbSetEpSuspDisableMask(), there may be chances of data corruption when Bulk and EP0-IN transfers happen concurrently. Even when you used CyU3PDmaChannelSendData(), this possibility existed - which was communicated in the thread you referred.

Regards,

Hemanth

View solution in original post

0 Likes
3 Replies
Hemanth
Moderator
Moderator

Hi,

Instead of  using CyU3PDmaChannelSendData() please test using CyU3PUsbSendEP0Data() itself - but along with this the following API needs to be used - CyU3PUsbSetEpSuspDisableMask() API (refer 5.36.7.52 of FX3 API guide) - which skips suspend of USB IN endpoints (as per the mask chosen).

But please note that by using CyU3PUsbSetEpSuspDisableMask(), there may be chances of data corruption when Bulk and EP0-IN transfers happen concurrently. Even when you used CyU3PDmaChannelSendData(), this possibility existed - which was communicated in the thread you referred.

Regards,

Hemanth

View solution in original post

0 Likes
kir_4703346
New Contributor II

Data Corruption occurs with bulk transfer even after using CyU3PUsbSetEpSuspDisableMask() API for MJPEG format in USB 2.0 port.

0 Likes
Hemanth
Moderator
Moderator

Hi,

Please note that using CyU3PUsbSetEpSuspDisableMask() OR using CyU3PDmaChannelSendData() directly will not prevent data corruption from happening. If you make sure that there is no active bulk transfer when control transfer (where data is sent to Host) happens, then corruption will not occur.

Regards,

Hemanth
0 Likes