FX3: USB transfers do not occur even after data is committed to USB socket – KBA231898
In FX3 SDK 1.3.4, if the DMA channel associated with a USB socket is created before setting up the USB connection using the CyU3PConnectState () API, USB transfers may not occur even after successfully committing the data to the USB socket (CyU3PDmaChannelCommitBuffer () or CyU3PDmaMultiChannelCommitBuffer () API returns CY_U3P_SUCCESS). An example scenario is shown in Figure 1 and Figure 2.
Figure 1. UART Debug Prints showing DMA buffers committed to USB Socket
Figure 2. USB IN Transfer fails from USB Control Center
- Error Code 997 is the timeout error which occurs when FX3 does not have data to transfer to the USB host.
- For information on FX3 DMA channel, DMA Buffers and Sockets, see the EZ-USB FX3 Technical Reference Manual.
- See AN75705: Getting started with EZ-USB FX3 for information on programming and performing data transfer to FX3 using USB Control Center.
This problem can be due to the known issue listed in the FX3 SDK Release Notes, which mentions that the settings for the DMA channels associated with USB sockets may be invalidated during the USB device mode connection startup.
To avoid this problem, you must reset the DMA channel using CyU3PDmaChannelReset () or CyU3PDma-MultiChannelReset () API and re-enable after each enumeration cycle. This can be done when the CY_U3P_USB_EVENT_SETCONF event occurs, indicating that the USB device has enumerated successfully. You should not use the DMA channel associated with the USB socket before the CY_U3P_USB_EVENT_SETCONF event.