2 Replies Latest reply on May 16, 2018 8:24 PM by jimmy_3301211

    how to get 10bit raw sensor data

    jimmy_3301211

      I am using an75779 sample code and the sensor is omni vision sensor ov426+ov6946.

      The data format is 10bit Raw with 400x400 resolution.

       

      here is what I did

      1. change cyfxuvcdscr.c to match 400x400 size

      2.init sensor setting(the setting works fine on the other platform)

      3.generate cyfxgpif2config.h based on cyfxuvc_an75779 (16bit, LD_DATA_COUNT=8183,LD_ADDR_COUNT=8183)

       

      but I still get a black window (amcap)

      the uart port shows the following message repeatly

      Application Started

      uvc: completed 0 frames and 0 buffers

      DMA Reset Event: Frame time overflow,time period=400

      Application Stopped

        • 1. Re: how to get 10bit raw sensor data
          srdr

          You have to consider the following for your requirement

           

          1. GPIF Settings:

           

          The GPIF can be operated in 8/16/24/32 bit data bus width.

          Here, you have chosen 16 bit data bus width and connecting a RAW10 sensor output. It means only 10 bits of the sensor output is connected 10 out of 16 bit GPIF data bus and the rest six are grounded or left floating.

           

          Note tha the LD_ADDR_COUNT and LD_DATA_COUNT counters need to be modified as per the chosen data bus width. Refer An75779.

           

          If the sensor configuration is correct and the FX3 firmware starts working, the GPIF sample 16 bits per clock - it includes 10 bits per pixel and additional 6 bits (0 or 1). Hence the host is receiving additional 6 bits for every pixel. You have to remove these additional 6 bits on the host application and send it to display the data.

           

           

          2.  UVC Descriptor and Probe Control Setting:

           

          Modify the UVC descriptors in descriptor file and probe control settings in uvc.c

           

          3. Host Application:

          Please check the whether the amcap is capable of displaying the RAW10 format.

          You told that you have changed the uvcdescriptor part as per the 400X400, 30 fps with RAW 10.

          There is GUID in Class specific Uncompressed VS format descriptor, it says that the UVC data is in YUY format. But you are sending RAW10 format. And the probe control settings on UVC.c file need to be modified as per the resolution, format, and fps.

           

          Note that you can use the UVC player to display the RAW data in YUV format. However, the image will look green in color. This can be used for firmware development and testing.

           

          4. Implementation

           

          As per the debug logs you posted, the GPIF is not receiving the data.

          Here are the comments for every debug print.

           

          Application Started - Application is started

          uvc: completed 0 frames and 0 buffers - There is no data filling to the Buffer. So there is no producer events.

          DMA Reset Event: Frame time overflow,time period=400 - We have set a timer with time out of 200ms in the FX3, it gets reset for every producer event (every buffer full) in the dmacallback. Since there is no data filling to buffer, no producer event. Hence, the timer is out/overflows, this triggers the DMA RESET

          Application Stopped - When there is a DMA RESET, the application will be stopped and finish the DMA RESET and starts the application.

           

          5. Further debugging steps:

           

          Check whether the FV(VSYNC) and LV(HSYNC) are set as per the requirement. Probe these lines and ensure that these lines are correctly connected to the FV and LV lines of FX3.

           

          If the FV and LV are configured and connected correcly, you have to see buffers are getting filled in the debug logs.

          • 2. Re: how to get 10bit raw sensor data
            jimmy_3301211

            thank you! It's very helpful.