Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
EZ-USB® FX3™ Issues With Simultaneous Bulk-IN and Control-IN Transfers In USB 2.0 – KBA92475
When operating Bulk-IN and Control-IN transfers in FX3™ simultaneously at USB 2.0 speed, Bulk-IN transfers are found to corrupt control endpoint data, causing errors in the control pipe. How do you avoid this?
To avoid this issue, ensure that the DMA channel corresponding to the Bulk-IN endpoint is suspended for the duration of the control request and resume it once the control request is completed. Follow the instructions below to do this.
When configuring the DMA channel, enable callback with callback notification = CY_U3P_DMA_CB_CONS_SUSP. This will generate a callback whenever the channel is successfully suspended.
In the setup callback function, where all the control standard/vendor requests are handled, check if the device has enumerated in 2.0 mode using the CyU3PUsbGetSpeed() API.
If CyU3PUsbGetSpeed() returns CY_U3P_HIGH_SPEED, suspend the Bulk pipe and wait until it suspends. Use the CyU3PDmaChannelSetSuspend() API to suspend the channel. Note that this API returns immediately and the channel suspension is confirmed when the DMA channel callback function (enabled in step 1) is invoked.
After the channel is successfully suspended, you can send the control endpoint data to the host using the CyU3PUsbSendEP0Data() API.
After the control endpoint data is sent to the host, wait for the transaction stage of the control transfer to complete. The USB event CY_U3P_USB_EVENT_EP0_STAT_CPLT signifies that this has occurred and the event has been handled in the USB event callback function.
Once the control transfer is successfully completed, the DMA channel for the Bulk-IN endpoint has to be taken out of the suspended state (CyU3PDmaChannelSetSuspend) and resumed (CyU3PDmaChannelResume) again as shown below.