4 Replies Latest reply on Sep 29, 2020 3:59 AM by RashiV_61

    FX3 GPIF blocking USB EP

    user_1484456

      I follow Cypress UVC expample on FX3 to develop USB3 vision application. I can talk with host by CCD command which comply to Gen<i>Cam standard.

      however, after I start GPIF to get picture packets, something is wrong with my USB bus, and the GenCP command words can't be got or sent to host.

       

      apiRetStatus = CyU3PGpifSMSwitch(CY_FX_U3V_INVALID_GPIF_STATE, START_SCK0,

      CY_FX_U3V_INVALID_GPIF_STATE, ALPHA_START_SCK0, CY_FX_U3V_GPIF_SWITCH_TIMEOUT);

      if (apiRetStatus != CY_U3P_SUCCESS)

      {

      /* Error Handling */

      CyU3PDebugPrint (4, "Switching GPIF state machine failed, Error Code = %d\r\n", apiRetStatus);

      CyFxAppErrorHandler (apiRetStatus);

      }

       

      I check the log from FX3 firmware, and session of USB bus, it seems USB bus stop. I can't know the reason. Indeed, it is similar with UVC firmware, why the UVC firmware have not htis issue? its debug channel is same as the GenCP channel with different end points.

       

        • 1. Re: FX3 GPIF blocking USB EP
          RashiV_61

          Hello,

           

          - Please let me know if you are using AN75779 firmware as the base of your application. If possible, please share your firmware.

          - Please share the complete UART debug logs after enabling the macro which enables printing frame size transferred or the PROD and CONS event.

          - Which resolution and format are you trying to stream and at what rate (fps)?

          - Please try calling CyU3PGpifGetSMState in the for{} and print the SMState through UART. This will help us to know if the GPIF SM is not stuck.

          CyU3PGpifGetSMState(&SMState);

          CyU3PDebugPrint (4, "\n\rAplnStrt:SMState = 0x%x",SMState);

           

          Regards,

          Rashi

          • 2. Re: FX3 GPIF blocking USB EP
            user_1484456

            - Please let me know if you are using AN75779 firmware as the base of your application. If possible, please share your firmware.

                 Answer: Yes, I use the AN75779 UVC example as the base of my appliction, just replace UVC with U3V from cypress USB3 vision example.

             

            - Please share the complete UART debug logs after enabling the macro which enables printing frame size transferred or the PROD and CONS event.

              Answer: in the upper picture, all UART logs are printed. but no Prod and Cons event is received.

             

            - Which resolution and format are you trying to stream and at what rate (fps)?

               Answer:  1280 * 720 @ 30fps

             

             

            - Please try calling CyU3PGpifGetSMState in the for{} and print the SMState through UART. This will help us to know if the GPIF SM is not stuck.

              Answer:  why UVC application doesn't stick, they have same stream structure.

            • 3. Re: FX3 GPIF blocking USB EP
              RashiV_61

              Hello,

               

              - in the upper picture, all UART logs are printed. but no Prod and Cons event is received.

              >> The default AN75779 firmware has a macro DEBUG_PRINT_FRAME_COUNT to print frame count. This can be enabled to get the debug prints

               

              - why UVC application doesn't stick, they have the same stream structure.

              >> Please let me know if your firmware has the same GPIF state machine used in the default AN75779 firmware or is it modified for U3V. If it is modified we need to check the GPIF state machine is not causing the issue. 

               

              Regards,

              Rashi

               

               

               

               

               

              • 4. Re: FX3 GPIF blocking USB EP
                RashiV_61

                Hello,

                 

                Please refer to this thread USB3 Vision DMA on Leader packet on FX3 which mentions the modification to the GPIF  state machine for sending the leader and trailer packets for each frame.

                 

                Regards,

                Rashi