Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Knowledge Base Articles

EZ-USB™ CX3 troubleshooting guide - KBA233853

Chelladurai
Community Manager
Community Manager 100 sign-ins 50 questions asked 50 sign-ins
Community Manager

EZ-USB™ CX3 troubleshooting guide - KBA233853

Version: *A

Video stream not visible while streaming through EZ-USB™ CX3

Do the following to debug:

  1. Enable the CX3_DEBUG_ENABLED, PRINT_FRAME_INFO, and CX3_ERROR_THREAD_ENABLE macros in the cycx3_uvc.h file in your EZ-USB™ CX3 firmware project and capture the debug logs. This switch will enable debug prints over UART for printing video frame details, CX3 MIPI errors, etc.
  2. Open a serial terminal (Tera Term or similar) utility that gives access to the COM port.
  3. Set the COM port configuration as 115200 baud, no parity, 1 stop bit, no flow control, and 8-bit data to view debug prints before starting transfers.

    Note: If UART cannot be used to get the debug prints, use the firmware attached with this KBA. With this firmware, the device enumerates as a composite device with CDC + UVC interface. Use serial terminal like Tera Term or any other application and then start the UVC host application.

  4. Check the debug prints and do the corresponding actions:
    Criteria to check in the debug prints Actions if criteria are not satisfied
    MIPI errors are 0
    1. Ensure that the MIPI CSI2 routing guidelines mentioned in Q8 of this KBA91295 are followed.
    2. Confirm that the MIPI transmitter is MIPI CSI-2 compliant (Version 1.01, Revision 0.04 – 2nd April 2009)

    Note: If the MIPI CSI clock used is continuous clock, see Q13 of this KBA91295. For details on MIPI errors, see KBA228482.

    The frame size received by EZ-USB™ CX3 is the same as the frame size reported in the USB descriptor for the particular resolution.
    1. Check whether the MIPI transmitter is configured with the same settings as the CX3 MIPI receiver configuration tool.
    2. Verify whether the HSYNC and VSYNC signals on the test points (mentioned in Q10 of this KBA91295) behave correctly per the chosen resolution and frame rate.
    3. Check whether there are any errors thrown by the CX3 MIPI receiver configuration tool.

    Note: The maximum CSI clock frequency should be used per Q13 of this KBA91297.
    Check whether the image throughput [bits per pixel × (Horizontal resolution + Horizontal blanking) × (Vertical resolution + vertical blanking) × frames per second] is less than or equal to the GPIF throughput [output pixel clock * GPIF_BUS_WIDTH].

    1. Confirm that the output video format of the CX3 configuration tool and GPIF_BUS_WIDTH is configured with the same setting.
    2. If you select the video format as “RAW” (RAW8/RAW10/RAW12/RAW14) in the CX3 configuration tool, you cannot use the UVC player to display the RAW data. However, the RAW data can be streamed as 16-bit/24-bit data by treating them as YUV format/ RGB888 format respectively.

    Note: For streaming RAW video format, see this KBA224387, which provides details on firmware modifications needed for padding/packing of the RAW video data. Note that the image will look green in color due to the mismatch in image formats. This method can be used for firmware development and testing. 

    DMA reset events are observed in the debug prints
    1. If the DMA reset event is due to a callback failure “CB failure”, see this KBA231382.
    2. Check if the handling of the DMA reset event done in the firmware as per this KBA218830.
    3. If the DMA reset event is due to video timer, check if the V_Total (V_Active + V-Blanking) period is more than TIMER_PERIOD defined in the firmware.
    4. If the DMA reset is still happening and is not due to one of these two reasons, then check if the image throughput is less than or equal to the GPIF throughput (output pixel clock * GPIF_BUS_WIDTH).
  5. Try setting the PHY time delay value calculated by the tool (see in right bottom corner of the MIPI receiver configuration as shown in Figure 1), using the CyU3PMipicsiSetPhyTimeDelay API.
    This function is used to set the CX3_PHY_TIME_DELAY register values. See EZ-USB™ CX3 TRM for details on this register. This function should be not be called while the MIPI-CSI PLL clocks are active. Either call this API after calling CyU3PMipicsiSetIntfParams() with wakeOnConfigure set to False (before calling CyU3PMipicsiWakeup()), or call CyU3PMipicsiSleep() before calling this API.
    KBA233853-fig1.PNG

     Figure 1 Phy time delay value from CX3 MIPI receiver tool 

  6. Check whether the video probe and commit control parameters dwMaxPayloadTransferSize and dwMaxVideoFrameSize are set correctly for the selected resolution.
  7. To check the total amount of data being sent out per frame, check the USB trace to find the data packets that have the end-of-frame bit set in the header.
    (The second byte of the header is either 0x8E or 0x8F for the end-of-frame transfer). The total image data transferred in a frame (not including the UVC header) should be: width * height * pixel size in bytes. See points 4,5,6, and 12 of this KBA226722. These points are applicable to EZ-USB™ CX3. If this is not the amount from the USB trace, there may be an issue with the MIPI interface; that is, a mismatch in the MIPI transmitter and CX3 MIPI receiver settings.
  8. Verify whether the video format GUID (guidFormat) is correctly set in the format descriptor and is supported by the host OS’s UVC driver.
  9. If the total amount of image data is correct and a host application still does not show any images, try with a different host machine.

Reduced frames per second observed in the host application

Do the following:

  1. Verify that the HSYNC and VSYNC signals on the test points (mentioned in Q10 of this KBA91295) are behaving correctly per the chosen resolution and frame rate.
  2. Check whether commit buffer failures are observed in UART debug prints. See KBA231382 for details on how to handle these failures.
  3. Check whether the vertical blanking time is greater than 500 us.
Attachments
0 Likes
Version history
Revision #:
4 of 4
Last update:
‎Nov 14, 2021 09:12 PM
Updated by: