This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] What are the common reasons V4L2 based applications fail to capture images from a probed CSI sensor?

Part Number: AM62A7
Other Parts Discussed in Thread: AM67,

Tool/software:

I connected my CSI camera to my board and the sensor has successfully probed, but I'm not able to capture images from the camera. None of "v4l2-ctl --stream-mmap", "yavta -c", or "gst-launch-1.0 v4l2src" can capture images. What could I have missed?

Other parts: AM62A3, , AM62A3-Q1, AM62A7-Q1, AM67, AM68AAM69A

  • There can be various reasons why the camera capture fails.

    1. Check the video device node

    Make sure the right video device node is used for capture. Refer to this FAQ:

    2. Check the link frequency 

    The link frequency for the sensor and D-PHY need to be configured properly. Reference: https://docs.kernel.org/driver-api/media/tx-rx.html#pixel-rate

      3. Configure the media graph 

      The most common miss causing capture failure is incorrect media graph configuration. After the sensor is probed, the entities and routes in the media graph need to be setup properly by the user space. For example, below is the media graph after an IMX219 sensor is probed on AM62A:

      Fullscreen
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      root@am62axx-evm:~# media-ctl -p -d /dev/media0
      Media controller API version 6.6.32
      Media device information
      ------------------------
      driver j721e-csi2rx
      model TI-CSI2RX
      serial
      bus info platform:30102000.ticsi2rx
      hw revision 0x1
      driver version 6.6.32
      Device topology
      - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
      type V4L2 subdev subtype Unknown flags 0
      device node name /dev/v4l-subdev0
      routes:
      0/0 -> 1/0 [ACTIVE]
      pad0: Sink
      [stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
      <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      Note that the format of "imx219 4-0010" is different from the format of "cdns_csi2rx.30101000.csi-bridge" and "30102000.ticsi2rx". This format mismatch prevents the image capture from running correctly.

      To fix this issue, run the following commands to change the format to be the same among the three entities:

      Fullscreen
      1
      2
      3
      root@am62axx-evm:~# media-ctl -V '"imx219 4-0010":0 [fmt:SRGGB8_1X8/1920x1080 field:none]'
      root@am62axx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:SRGGB8_1X8/1920x1080 field:none]'
      root@am62axx-evm:~# media-ctl -V '"30102000.ticsi2rx":0 [fmt:SRGGB8_1X8/1920x1080 field:none]'
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      Now rerun "media-ctl -p" command to verify that the image format is the same across the media graph:

      Fullscreen
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      root@am62axx-evm:~# media-ctl -p
      Media controller API version 6.6.32
      Media device information
      ------------------------
      driver j721e-csi2rx
      model TI-CSI2RX
      serial
      bus info platform:30102000.ticsi2rx
      hw revision 0x1
      driver version 6.6.32
      Device topology
      - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
      type V4L2 subdev subtype Unknown flags 0
      device node name /dev/v4l-subdev0
      routes:
      0/0 -> 1/0 [ACTIVE]
      pad0: Sink
      [stream:0 fmt:SRGGB8_1X8/1920x1080 field:none]
      <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

      For sensors with multiple virtual channels, please refer to the following FAQ on setting the routes in the media graph

      For other common problems related to CSI camera please refer to this FAQ: