1 2 Previous Next 20 Replies Latest reply on Feb 1, 2019 1:32 AM by abhinavg_21

    UVC CX3 no FPS

    VlKh_2251656

      Good day.

       

      Now, we made our custom video camera on chip Cypress CX3 and optical sensor ov5640.

       

      We took a "Denebola" debugging kit, its scheme and software as a sample.

       

      During operation, the device is normally identified as a UVC device.

       

      All the settings are available (brightness, color, resolution selection, ...)

      There is communication with the sensor on the line I2C.

       

      But there is no transmission of video information, that is, the media player window shows: 0 fps and black screen...

       

      Please, Tell me, what could be the cause of this phenomenon?

       

      Bad contact or lack of contact between the sensor and the cypress chip along the MIPI lane? Distortion signal MIPI?

       

      Tell me, please, is it possible to programmatically check whether the correct mipi signal comes from the sensor OV560 to the cypress CX3?

       

      PCB makers say they did everything right.

        • 1. Re: UVC CX3 no FPS
          VlKh_2251656

          It's photo:

          • 2. Re: UVC CX3 no FPS
            abhinavg_21

            Hi Vladimir,

             

            Are you facing this issue only with the custom PCB board or with Denabola kit also? Please enable the debug log messages and share the debug logs.  Also probe the MIPI data lanes to check for the data.

             

            Thanks & Regards
            Abhinav

            • 3. Re: UVC CX3 no FPS
              VlKh_2251656

              Only in custom board.

               

              screen_.jpg

               

               

              Full log in attachment file.

              • 4. Re: UVC CX3 no FPS
                VlKh_2251656

                Good day

                 

                 

                I added another task for MIPI errors printing:

                 

                void myThread_Entry(uint32_t input)
                {
                CyU3PMipicsiErrorCounts_t errorCounts;
                uint32_t sum = 0;
                
                
                while(1)
                {
                          CyU3PMipicsiGetErrors (CyFalse, &errorCounts);
                
                          sum = errorCounts.crcErrCnt +
                          errorCounts.ctlErrCnt +
                          errorCounts.eidErrCnt +
                          errorCounts.frmErrCnt +
                          errorCounts.mdlErrCnt +
                          errorCounts.recSyncErrCnt +
                          errorCounts.recrErrCnt +
                          errorCounts.unrSyncErrCnt +
                          errorCounts.unrcErrCnt;
                
                          CyU3PDebugPrint (4, "\n\r mipi errors = 0x%x", sum);
                          CyU3PThreadSleep(1000);
                     }
                }
                

                 

                 

                 

                I look at the output in the terminal:

                 

                          mipi errors = 0x0

                 

                That is, there are no mipi errors?

                 

                 

                If the mipi signal does not come or is distorted, will this be shown in these errors?

                 

                 

                Many thanks.

                • 5. Re: UVC CX3 no FPS
                  VlKh_2251656

                  I modified the project code a lot:

                   

                  // GpifCB callback function is invoked when FV triggers GPIF interrupt */
                  void esUVCGpifCB (CyU3PGpifEventType event, uint8_t currentState)
                  {
                      CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
                      // Handle interrupt from the State Machine */
                      if (event == CYU3P_GPIF_EVT_SM_INTERRUPT)
                      {
                          // Wrapup Socket 0*/
                          if(currentState == CX3_PARTIAL_BUFFER_IN_SCK0)
                          {
                              status = CyU3PDmaMultiChannelSetWrapUp(&glChHandleUVCStream, 0);
                              if (status != CY_U3P_SUCCESS)
                              {
                                  CyU3PDebugPrint (4, "\n\rGpifCB:WrapUp SCK0 Err = 0x%x", status);
                              }
                          }
                          // Wrapup Socket 1 */
                          else if(currentState == CX3_PARTIAL_BUFFER_IN_SCK1)
                          {
                              status = CyU3PDmaMultiChannelSetWrapUp(&glChHandleUVCStream, 1);
                              if (status != CY_U3P_SUCCESS)
                              {
                                  CyU3PDebugPrint (4, "\n\rGpifCB:WrapUp SCK1 Err = 0x%x", status);
                              }
                          }
                         CyU3PDebugPrint (4, ".");
                      }
                  }
                  

                   

                   

                  Adding line debug print:

                          CyU3PDebugPrint (4, ".");

                   

                  Added debug in terminal output when receiving a frame.

                   

                   

                  On the denebol board there is a symbol "." output,

                   

                   

                  mipi errors = 0x0
                  ...................
                  mipi errors = 0x0
                  ...................
                  mipi errors = 0x0
                  ...................
                  

                   

                   

                  Tell me, is this correct?

                   

                  But on our custom board it is not symbol ".".

                   

                  mipi errors = 0x0
                  mipi errors = 0x0
                  mipi errors = 0x0
                  

                   

                   

                  Tell me, can this indicate that we are not receiving video information on line MiPi?

                   

                   

                  Many thanks.

                  • 6. Re: UVC CX3 no FPS
                    VlKh_2251656

                    Or, no......

                    many, many MIPI errors.....

                     

                    o....

                    • 7. Re: UVC CX3 no FPS
                      VlKh_2251656

                      Yes!

                       

                      Please, see:

                       

                      typedef struct CyU3PMipicsiErrorCounts_t

                      {

                          uint8_t frmErrCnt;          /**< Framing Error Count*/

                          uint8_t crcErrCnt;          /**< CRC Error Count*/

                          uint8_t mdlErrCnt;          /**< Multi-Data Lane Sync Byte Error Count*/

                         uint8_t ctlErrCnt;          /**< Control Error (Incorrect Line State Sequence) Count*/

                          uint8_t eidErrCnt;          /**< Unsupported Packet ID Error Count */

                          uint8_t recrErrCnt;         /**< Recoverable Packet Header Error Count*/

                          uint8_t unrcErrCnt;         /**< Unrecoverable Packet Header Error Count*/

                          uint8_t recSyncErrCnt;      /**< Recoverable Sync Byte Error Count*/

                          uint8_t unrSyncErrCnt;      /**< Unrecoverable Sync Byte Error Count*/

                      } CyU3PMipicsiErrorCounts_t;

                       

                       

                      And value ctlErrCnt is very big...

                      • 8. Re: UVC CX3 no FPS
                        KandlaguntaR_36

                        Hello,

                         

                        Can you please print all the mipi errors individually instead sum?

                        As per previous response, you are seeing ctlErrCnt errors. Please confirm.

                        If yes, please check whether you have connected the MIPI lines properly.

                        0 lane of sensor with 0 lane of CX3 MIPI, 1 lane of sensor with 1 lane of CX3 MIPI, 2 lane of sensor with 2 lane of CX3 MIPI and 3 lane of sensor with 3 lane of CX3 MIPI.

                         

                        Also Probe HSYNC_Test and VSYNC_Test Pins and share the active and blanking time.

                        If there are any mipi errors, you will not see proper VSYNC and HSYNC signals.

                        • 9. Re: UVC CX3 no FPS
                          VlKh_2251656

                          Yes.

                           

                          Error ctlErrCnt occurs sometimes, but not very often.

                          More often it appears when connecting via USB3.

                           

                          Thank you very much.

                          • 10. Re: UVC CX3 no FPS
                            VlKh_2251656

                            Many thanks

                            Now I look vsync and hsync

                            I wiil answer about vsyns, hsync in next post

                            • 11. Re: UVC CX3 no FPS
                              VlKh_2251656

                              Dear,

                              now I look oscillograms

                              For example, USB3 connection, resolution 640*480, 60 fps.

                              Only hsync sygnal ( ? )

                               

                              Freq above 30 kHz.

                              • 12. Re: UVC CX3 no FPS
                                VlKh_2251656

                                Oscillls in attachment

                                • 13. Re: UVC CX3 no FPS
                                  VlKh_2251656

                                  It's hsync sygnal ?

                                   

                                  Very corrupt sinus sygnal.

                                  No other sygnals...

                                  • 14. Re: UVC CX3 no FPS
                                    VlKh_2251656

                                    In other scales:

                                    1 2 Previous Next