2 Replies Latest reply on May 16, 2017 7:16 PM by nisa

    HSYNC and VSYNC read by CX3

    ilatasa_1693811

      Hi all,

         

      is it possible to read from CX3 the output of HSYNC and VSYNC test points? (without connect it to another GPIO,

         

      Thanks, and regards,

         

      Iban.

        • 1. Re: HSYNC and VSYNC read by CX3
          ilatasa_1693811

          Or, is it possible to get an event in OV5640 firmware example, when a frame from image sensor has been finished?

             

          Thanks.

          • 2. Re: HSYNC and VSYNC read by CX3
            nisa

            If you look at the Cx3UvcOV5640 firmware in the SDK, you will notice that we are using a manual DMA channel here. In the DMA callback, we are adding the UVC related headers. These headers are different for normal transfers and end of frames (EOF)/HSync. This detection is based in the firmware by making sure that only last data buffer in a frame is partial. So, whenever we get a partial buffer, that will be the end of frame. If you see at the snippet below, we check the DMA-buffer count (if it is less than DMA buffer size), then it is an end of frame. However, Vsync is not that straight forward.  This way, you can check end of frame from the firmware without using GPIO.  

               

              status = CyU3PDmaMultiChannelGetBuffer(chHandle, &dmaBuffer, CYU3P_NO_WAIT);
                    while (status == CY_U3P_SUCCESS)
                    {
                        /* Add Headers*/
                        if(dmaBuffer.count < CX3_APP_DATA_BUF_SIZE)
                        {
                            CyCx3AppAddHeader ((dmaBuffer.buffer - CX3_APP_PROD_HEADER), CX3_APP_HEADER_EOF);
                            glHitFV = CyTrue;
                            glPartialBufSize = dmaBuffer.count;
                        }