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] TDA4VM: Steps for executing linux CSI on SDK

Part Number: TDA4VM

What are the steps for executing linux CSI on SDK?

  • Note : Please ensure that the CSI module is working fine on the RTOS side (i.e., Please run the single_cam demo in the RTOS SDK which uses the csi module)

    1. Disable the macros ENABLE_CSI2RX & ENABLE_CSI2TX in the file ${PSDKRA}/vision_apps/platform/j721e/rtos/common/app_cfg_mcu2_0.h

    2. Build sdk and copy the file system to the SD card.

    3. In the Linux SDK (i.e., PSDKLA), remove the csi related components that are disabled (i.e., ti_csi2rx0, ti_csi2rx1, main_i2c6) , from the file ${PSDKLA}/board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/arch/arm64/boot/dts/ti/k3-j721e-vision-apps.dts

    4. Build the vision_apps overlay using below command

        cd ${PSDKLA}/
        make linux-dtbs

    5. Copy the file k3-j721e-vision-apps.dtbo present at ${PSDKLA}/board-support/linux-5.10.120+gitAUTOINC+95b90aa828-g95b90aa828/arch/arm64/boot/dts/ti/ to /media/${USER}/rootfs/boot/ and replace the existing file.

    6. Include the overlay dtb such as "k3-j721e-fpdlink-cpb-fusion.dtbo", "k3-j721e-fpdlink-imx390-rcm-0-0.dtbo" etc in uenv.txt present in BOOT partition of SD card as shown below
        name_overlays=k3-j721e-vision-apps.dtbo k3-j721e-fpdlink-cpb-fusion.dtbo k3-j721e-fpdlink-imx390-rcm-0-0.dtbo

    5. The above overlays enable fusion board, IMX390 rcm camera at port 0-csi0

    6. Once the evm reaches the login command, login as root.

    7. Type "media-ctl -p" to show the topology at csi0

    8. Set the formats and routes for each module required for your transmission. Refer the below example

        # Set formats for UB953s first
          media-ctl -V '"ds90ub953 9-0044":0 [fmt:SRGGB12_1X12/1936x1100 field: none]'

        # Set UB960 routes
          media-ctl -R '"ds90ub960 9-003d" [0/0 -> 4/0 [1]]'

        # Set UB960 formats
           media-ctl -V '"ds90ub960 9-003d":0 [fmt:SRGGB12_1X12/1936x1100 field: none]'

        # Set j721e-csi2rx routes
          media-ctl -R '"4500000.ticsi2rx" [0/0 -> 1/0 [1]]'

    9. Set the below command to start capturing the frames, the below command streams from both csi0
        yavta -c1000 -f SRGGB12 -s 1936x1100 /dev/video2

    Note : /dev/videoX information can be obtained from step 7.
        For multiple cameras,
            Add multiple dtbo files in "name_overlays" in step 6
            Type "media-ctl -p -dx" to view the topology at port x of csi, where x = 0,1,2...
            Send "yavta -c1000 -f SRGGB12 -s 1936x1100 /dev/videoX & yavta -c1000 -f SRGGB12 -s 1936x1100 /dev/videoY" to stream multiple cameras.