5 Replies Latest reply on Feb 22, 2016 7:55 AM by julian.grahsl

    What triggers CY_U3P_USB_EVENT_EP_UNDERRUN on EP 0x80?






      We have a transient problem while receiving data from FX3 via a BULK IN endpoint and simultaneously issuing vendor requests towards the FX3 device.  I use the FX3 SDK version 1.3.1.




      At random, a USB event CY_U3P_USB_EVENT_EP_UNDERRUN on endpoint 0x80 is reported and starting from this point in time, all data responses from FX3 to vendor requests via CyU3PSendEP0Data are received on the host as garbage (completely corrupted data).


      Following facts are holding in the error condition:


      .) Endpoint 0x80 and 0x00 are not stalled or not nak as i checked with UsbGetEpCfg on endpoint 0x80.


      .) The data streamed via BULK IN endpoint is still working although. 


      .) Vendor Requests are received and CyU3PUSBSetupCb_t is called correctly (Only the SendEp0Data response gets corrupted).


      .) My processing in the CyU3PUSBSetupCb_t only does EventSet and GpioGetValue so it returns very quickly.


      .) I am calling only one of these functions in CyU3PUSBSetupCb_t: UsbAckSetup, UsbStall, SendEP0Data, GetEP0Data.


      .) I return the value CyTrue from CyU3PUSBSetupCb_t at least in case of SendEP0Data or GetEP0Data.




      Under what conditions does the USB event CY_U3P_USB_EVENT_EP_UNDERRUN occur and how can i recover from this situation or avoid it ?


      kind regards,