1 2 3 4 Previous Next 46 Replies Latest reply on Jun 19, 2019 1:13 AM by KandlaguntaR_36

    CyU3PUsbSendEP0 Timeout issue


      CyU3PUsbSendEP0Data fail on Timeout 


      Hi there,


      I reactive this post because with CX3 and 1.3.4 SDK I still encounter the problem. Here is the situation. We have IN transfers superspeed nearly at maximum data rate of CX3. Typically, it is more than 2 Gbits/s. we use the EP0 for (vendor) commands and thus IN transfer. These IN transfers  on EP0 are very small, typically only 2 bytes returned as IN.


      At a point, we get timeout code as result of CyU3PUsbSendEP0 function and after that there is NO way to retrieve the correct behavior even when IN superspeed transfers ends. I find this totally weird. There is no mean to reset this situation ?

      On parallel OUT EP0 is still working, exactly as described in this post.


      I tried to use the "suspend" code here described but this doesn't work because the suspend operation is not reliable and most of the time doesn't operate any suspend in DMA transfers : the gChannelSuspended variable doesn't commute to suspended state and timeout variable comes to zero itself. "Sometimes" the suspend arises but most of the time it doesn't. By the way we use auto Many to One transfers operations for the superspeed IN high data rate endpoint.


      I also didn't find where the GpifToUSB code can help to understand the situation.


      Is there a solution for this ? This problem seams to be present since several years now, we would be happy to solve it because this is really a HUGE problem when using CX3 and FX3.

      Please give a solution for a RELIABLE EP0 RESET when timeout arises !!


      Thank you

      Best Regards.

        • 1. Re: CyU3PUsbSendEP0 Timeout issue



          As said in section 2.3 and sub-section IV of FX3_SDK Troubleshooting Guide (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware), the FX3 has this problem in high-speed mode, and the work around is provided in the library 1.3.3 on wards. We have not seen this issue in USB Superspeed mode.

          Please confirm whether you are operaing in USB 2.0 or USB 3.0 mode.


          Can you please share the .c file where you are handling the vendor requests and what is the timeut error you have received for CyU3PUsbSendEP0 API?


          • 2. Re: CyU3PUsbSendEP0 Timeout issue

            Hi KandlaguntaR_36,

            Of course we are in superspeed USB3 mode (IN EP3 data rate >2 Gbits/s).

            We use the 1.3.4 library and this is a CX3 board.

            CyU3PUSBSendEP0 returns 69 as error code. Is there a way to precise this further ?

            I can send you the .c files through e-mail address but this is quite basic code regarding the EP0 handling.

            Thank you for your help,

            Best Regards,

            • 3. Re: CyU3PUsbSendEP0 Timeout issue

              Hi again KandlaguntaR_36,


              Anyway, could I get a workaround that would be simply to "reset" the EP0 IN ? As I control the driver part of PC either, this would be enough to continue the development of the CX3 board before a complete solution without this 69 blocking error to appear.


              Best Regards

              • 4. Re: CyU3PUsbSendEP0 Timeout issue

                Can you help me in re-producing the issue at my end?

                • 5. Re: CyU3PUsbSendEP0 Timeout issue


                  however it is our own board and of course firmware.

                  first, this is the requested file.

                  You'll see it is quite basic.

                  All answers on EP0 are 2 bytes long for vendorcommands.

                  Hope this will help

                  Best regards,

                  • 6. Re: CyU3PUsbSendEP0 Timeout issue

                    Would it be possible to apply the USB 2.0 patch in USB 3.0 mode ?

                    My case confirms that this issue exists also in USB 3.0 !

                    Best Regards

                    • 7. Re: CyU3PUsbSendEP0 Timeout issue

                      from your answer, I guess the CyU3PUsbSuspendInEpChannels() has to be performed to avoid this.

                      however this is static function so probably not callable directly from firmware.

                      I'll try to implement it in my own code.

                      Best Regards

                      • 8. Re: CyU3PUsbSendEP0 Timeout issue

                        if (glUibDeviceInfo.usbSpeed != CY_U3P_SUPER_SPEED)


                        code is preventing the suspend action in SendEP0 function code while super_speed is performed.


                        So I have to completly modify this part.

                        Hope this is possible simply or I'll have to recompile the library without itself. Maybe You can help for this  ?

                        Best Regards

                        • 9. Re: CyU3PUsbSendEP0 Timeout issue


                          I have implemented the SendEP0 code with the only modification is to unset to == SUPER_SPEED tests and then authorize the suspend modification even in super_speed.

                          However, this does'nt prevent the issue to appear.

                          So I'd like to have the way to reset the EP0 IN to re-authorize transfers. The error is handled in driver so resetting the EP0 and restart IN EP0 transfer is not a problem.

                          Thank you for your help,

                          Best Regards.

                          • 10. Re: CyU3PUsbSendEP0 Timeout issue



                            It is quite hard to understand why it is so difficult to simply reset the endpoint IN 0. I cannot find any reliable code for this. In the library there is following code :


                            static CyBool_t

                            CyU3PUsbIsNewCtrlRqtRecvd (



                                if ((glUibDeviceInfo.newCtrlRqt) || (UIB->dev_ctl_intr & CY_U3P_UIB_SUDAV) ||

                                        (USB3PROT->prot_intr & CY_U3P_UIB_SUTOK_EV))

                                    return CyTrue;

                                return CyFalse;



                            when it returns CyFalse, it is bye bye, no way to answer on IN EP0 after. Could you explain how to handle this ?

                            Thank you for your help,

                            Best Regards

                            • 11. Re: CyU3PUsbSendEP0 Timeout issue


                              Is anybody there ??

                              Is this issue so difficult to be solved ?

                              This problems lasts for several years now. It's time to bring a reliable solution.


                              Best Regards

                              • 12. Re: CyU3PUsbSendEP0 Timeout issue


                                the problem lays in the SendEP0 function with this test :


                                                     /* Wait until the DMA socket and EPM are in ready state. */

                                                     while ((((UIB->sck[0].status & CY_U3P_UIB_STATE_MASK) >> CY_U3P_UIB_STATE_POS) != CY_U3P_UIB_STATE_ACTIVE) ||

                                                             ((UIB->eepm_endpoint[0] & CY_U3P_UIB_EEPM_EP_READY) == 0))


                                when this is never succeed in 500 ms (so called "tmo error") in code, then how to reset the EP0 IN correctly ?

                                I just want this information, I can manage otherwise.

                                Best Regards,

                                • 13. Re: CyU3PUsbSendEP0 Timeout issue

                                  precisely, on the previous test the problem is when :


                                  ((UIB->eepm_endpoint[0] & CY_U3P_UIB_EEPM_EP_READY) == 0))


                                  is set to true to TRUE, ie UIB->eepm_endpoint[0] stays at 0x200 instead of (1<<30) | 0x200

                                  hope this can help.

                                  Can you explain how to turn this bit ON thus solving th e problem ? Of course setting it directly doesn't work. It auto returns to 0.


                                  Best regards.

                                  • 14. Re: CyU3PUsbSendEP0 Timeout issue


                                    If you could tell me how to reset the CY_U3P_UIB_EEPM_EP_READY bit of UIB->eepm_endpoint[0]  when it is blocked at zero value, thus preventing all send to process normally, that would be great help.


                                    Thank you for you help

                                    Best Regards.

                                    1 2 3 4 Previous Next