MIPI CSI Virtual Channel Configuration Issue for Multiple Cameras on Nvidia Jetson Orin Nano

Issue Overview

Users are experiencing difficulties when attempting to capture video data from multiple cameras (up to 4) using MIPI CSI virtual channels on the Nvidia Jetson Orin Nano platform. The system works correctly with one or two cameras, but fails when three or four cameras are connected. The specific symptoms include:

  • Successful operation with one or two cameras
  • Failure to obtain video data from two cameras when three or four are connected
  • Error messages indicating a channel selection mismatch (CHANSEL_NOMATCH)
  • Initial suspicion of pixel clock and data format mismatches

Possible Causes

  1. Insufficient System Resources: The platform may struggle to handle the bandwidth required for multiple high-resolution cameras simultaneously.

  2. MIPI CSI Configuration Errors: Incorrect settings in the device tree for virtual channels, port indices, or other MIPI CSI parameters.

  3. Clock Rate Limitations: Inadequate clock rates for VI, NVCSI, or ISP components when handling multiple camera streams.

  4. Data Format Mismatch: Discrepancies between the expected and actual data formats being transmitted by the cameras.

  5. MIPI Clock Speed Issues: Excessively high MIPI clock speeds leading to signal integrity problems.

Troubleshooting Steps, Solutions & Fixes

  1. Adjust MIPI Clock Speed:

    • Reduce the MIPI clock speed from 2.5G to 2.4G. This solution has been reported to resolve the issue for some users.
  2. Increase System Clocks:

    • Boost the VI, NVCSI, and ISP clocks to their maximum rates:
    sudo su
    echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
    echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
    echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
    cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
    cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
    cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
    
  3. Verify Data Format:

    • Ensure that the cameras are configured to send RAW12 format as expected by the system. Check the camera configuration and the device tree settings.
  4. Adjust Pixel Clock:

    • If increasing system clocks doesn’t help, try modifying the pix_clk_hz value in the device tree. For example, increase it from 300000000 to 400000000.
  5. Review Device Tree Configuration:

    • Double-check the device tree configuration for each camera, ensuring that:
      • Virtual channel IDs (vc-id) are correctly assigned
      • Port indices are unique and properly set
      • CSI lanes and bus widths are accurately configured
  6. Gradual Testing:

    • Test the system incrementally, adding one camera at a time to isolate the point of failure.
  7. Monitor System Resources:

    • Use system monitoring tools to check CPU, memory, and I/O usage when running multiple cameras to identify potential bottlenecks.
  8. Update Firmware and Drivers:

    • Ensure that you are using the latest firmware for the Jetson Orin Nano and the most recent camera drivers.
  9. Check Physical Connections:

    • Verify that all MIPI CSI connections are secure and that the cables are not damaged or too long, which could cause signal degradation.

If the issue persists after trying these solutions, consider reaching out to Nvidia support or consulting with the camera manufacturer for further assistance. Additionally, sharing detailed logs and the complete device tree configuration may help in identifying more specific issues.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *