5 Replies Latest reply on Aug 19, 2019 6:36 AM by KeWa_2323766

    FX3 UVC black screen for image sensor 808*608

    KeWa_2323766

      I am using Python 480 sensor together with FX3. It is 10-bit data bus, SPI configuration interface, 808*608 pixel image sensor. Image format is raw 10 bit.  Design is based on AN75779 sample code. So, I made modifications according to instruction in AN75779.

      1. GPIF interface and state machine
        1. data bus width :change from 8-bit to 16-bit
        2. active clock edge: change from positive to negative
        3. fx3 Peripherals used: add SPI
        4. signals: sensor reset signal change from GPIO 22 to GPIO 23
        5. state machine:
          1. LD_ADDR_COUNT: change  to 8183
          2. LD_DATA_COUNT:  change to 8183
      2. cyfxuvcdscr.c file
        1. Class specific Uncompressed VS format descriptor ( for both High speed and super speed)
          1.   X dimension of the picture aspect ratio:   from 0x08 to 0x65 (808/608=101:76 = 0x65:0x4C. Is this the right way to calculate ratio??)
          2.   Y dimension of the picture aspect ratio:  from 0x06 to 0x4C
          3.    GUID: keep YUY2. (Please let me know the 16-BYTE hexadecimal value of GUID for 16-bit raw image and 24-bit raw image???)
        2. Class specific Uncompressed VS frame descriptor  ( for both high speed and super speed)
          1. Width in pixel : change to 808,  i.e. 0x 28, 0x03
          2.   Height in pixel : change to 480, i.e. 0X60,  0x02
          3.   Min bit rate bits/s : 
            1. High speed : 10fps : 808 * 608 *16 *10 =0x4AF6000
            2. Super speed: 60fps : 808*608*16*60 =0x1C1C4000
          4.   Max bit rate bits/s
            1. Hispeed: 30fps : 808*608*16*30 = 0xE0E2000
            2. Superspeed: 132fps : 808*608*16*132 = 0x3DD7C000
          5.   Maximum video or still frame size in bytes(Deprecated): change to  808*608*2 = 0xEFE00(for both high speed and super speed)
          6. Default Frame Interval
            1. High speed: 30fps: 0x51615 (100ns)
            2. Super speed:132fps: 0x127EE (100ns)
          7. Shortest Frame Interval
            1. High speed: 30fps:0x51615 (100ns)
            2. Super speed:132fps:  0x127EE(100ns)
      3. UVC.c file
        1. glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING]
        2. glProbeCtrl20[CY_FX_UVC_MAX_PROBE_SETTING]
        3. replace corresponding I2C sensor functions with current SPI functions.
        4. add GPIF state machine status capture
        5. add sensor registers configuration read back for confirmation
      4. uvc.h
        1. enable DEBUG_PRINT_FRAME_COUNT

       

      Please see attached files for above modifications.

       

      Pixel clock, frame valid and line valid signals are correct. Timing between frame valid and line valid are good. Captured waveforms are attached. 1.8V GPIF interface logic level is used

      But the UVC host only can show " The format is right. But the framerate is 0.

      USB can be detected as super speed. Please see log file for debug print on UART port.  The log is power on device-> start UVC host application->close UVC host application.  log file shows there is frame received and frames in the buffer also. But can't display frames on host application. Host application has no problem to display other UVC devices.

       

      I need help on which part could be wrong with it.

       

      Thanks in advance for help.