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.

J784S4XEVM: IMX390 not detected / init_script.sh is crashing

Part Number: J784S4XEVM

Tool/software:

Hi,

after loading the fusion board properly and having a camera attached at port 0 of each CSI-2 interface I face a new problem

name_overlays=k3-j784s4-evm-virt-mac-client.dtbo k3-j784s4-vision-apps.dtbo k3-j784s4-edgeai-apps.dtbo k3-j721s2-evm-fusion.dtbo k3-fpdlink-imx390-rcm-0-0.dtbo k3-fpdlink-imx390-rcm-1-0.dtbo

After running init_script.sh it crashes

root@ve-vob-0001a:/opt/edgeai-gst-apps# ./init_script.sh 
terminate called after throwing an instance of 'std::runtime_error'
  what():  No modesetting DRM card found

fusion board dmesg:

root@ve-vob-0001a:~# dmesg | grep ds90
[    4.394230] ds90ub960 2-0036: supply vddio not found, using dummy regulator
[    4.516364] ds90ub960 2-003d: supply vddio not found, using dummy regulator
[    4.764512] ds90ub953 2-0054: Found ub953 rev/mask 0x20
[    4.775500] ds90ub953 2-0044: Found ub953 rev/mask 0x20

i2cdetect

root@ve-vob-0001a:~# i2cdetect -y -r 0x2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- UU -- -- -- -- -- -- UU -- -- 
40: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

It looks correct to me.
is there anything I am missing to make this work?

  • The splash screen is also not working. Maybe that helps as it is probably also related to the KMS (kmstest) which throws the "No modesetting DRM card found" error mentioned above.

    root@ve-vob-0001a:~# systemctl status psplash-start.service
    × psplash-start.service - Start psplash boot splash screen
         Loaded: loaded (/lib/systemd/system/psplash-start.service; enabled; vendor preset: enabled)
         Active: failed (Result: exit-code) since Thu 2022-04-28 17:42:26 UTC; 2 years 1 month ago
        Process: 243 ExecStart=/usr/bin/psplash (code=exited, status=255/EXCEPTION)
       Main PID: 243 (code=exited, status=255/EXCEPTION)
    
    Apr 28 17:42:25 ve-vob-0001a psplash[243]: Error opening /dev/fb0
    Apr 28 17:42:26 ve-vob-0001a systemd[1]: psplash-start.service: Main process exited, code=exited, status=255/EXCEPTION
    Apr 28 17:42:26 ve-vob-0001a systemd[1]: psplash-start.service: Failed with result 'exit-code'.
    Apr 28 17:42:26 ve-vob-0001a systemd[1]: Failed to start Start psplash boot splash screen.

  • Hi,

    You are using "k3-j784s4-vision-apps.dtbo" in the environment file, which disables dss and csirx from Linux. Please remove this and try the same again.

    Regards,

    Nikhil

  • I removed the overlay as you suggested and this is what it looks like now:

    root@ve-vob-0001a:/opt/edgeai-gst-apps# dmesg | grep ds90
    [    4.524932] ds90ub960 3-0036: supply vddio not found, using dummy regulator
    [    4.642043] ds90ub960 3-003d: supply vddio not found, using dummy regulator
    [    4.914307] ds90ub953 3-0054: Found ub953 rev/mask 0x20
    [    4.941323] ds90ub953 3-0044: Found ub953 rev/mask 0x20
    [    4.950141] ds90ub960 3-003d: Consider updating driver ds90ub960 to match on endpoints
    [    4.970967] ds90ub960 3-0036: Consider updating driver ds90ub960 to match on endpoints

    The init script does not output anything:

    root@ve-vob-0001a:/opt/edgeai-gst-apps# ./init_script.sh 
    root@ve-vob-0001a:/opt/edgeai-gst-apps# 
    


    And I need the k3-j784s4-vision-apps.dtbo to run LDC for example as part of our gstreamer pipelines. The vision apps are supposed to run together with the cameras right? That is their purpose. How can we have both?

  • Hi Richard,

    Try changing the fusion overlay in your U-Boot environment variables from k3-j721s2-evm-fusion.dtbo to k3-j784s4-fpdlink-fusion.dtbo.

    Thank you,

    Fabiana

  • Hi Fabiana, thank you for the suggestion. I do not have the  k3-j784s4-fpdlink-fusion.dtbo file available. It is at least not part of the ti-processor-sdk-linux-adas-j784s4-evm-09_01_00_06. Where can I find it?

  • Hello Fabiana,

    We are using Linux. I downloaded version 9.2 of the SDK but there is no k3-j784s4-fpdlink-fusion.dtbo file. According to the steps you linked we need to load the k3-j784s4-fpdlink-fusion.dtbo file.

    The SDK comes with a k3-j721s2-evm-fusion.dtso to create the respective dtbo file but that is the one we are loading right now with the result posted above.

    These are the j784s4 files that are part of the SDK 9.2:

    -rw-r--r--   1 rsc rsc  13362 mar  9  2018 k3-j784s4-edgeai-apps.dtbo
    -rw-r--r--   1 rsc rsc   1626 mar  9  2018 k3-j784s4-evm-csi2-ov5640.dtbo
    -rw-r--r--   1 rsc rsc 114029 mar  9  2018 k3-j784s4-evm.dtb
    -rw-r--r--   1 rsc rsc   4275 mar  9  2018 k3-j784s4-evm-quad-port-eth-exp1.dtbo
    -rw-r--r--   1 rsc rsc   2027 mar  9  2018 k3-j784s4-evm-usxgmii-exp1-exp2.dtbo
    -rw-r--r--   1 rsc rsc   3943 mar  9  2018 k3-j784s4-evm-virt-mac-client.dtbo
    -rw-r--r--   1 rsc rsc  14601 mar  9  2018 k3-j784s4-vision-apps.dtbo
    

    Thank you

    Richard

  • Hello Richard,

    After looking into this internally, it appears that this is a known v9.2 SDK bug. The k3-j721s2-evm-fusion.dtbo overlay can indeed be used for j784s4 as the device tree is the same. Are you powering on the fusion board before the EVM? Could you also walk me through the steps you took to set up the software?

    Thank you,

    Fabiana

  • Hello Fabiana,

    we are powering the fusion board through the EVM. We will try to power them in the order you suggested.
    The initial post of this thread actually describes all our steps we made to test the cameras. We changed the uEnv.txt as described and then booted. I run the ./init_script.sh as described and then dmesg | grep ds90 and then i2cdetect. To my understanding the marked registered with UU from the i2cdetect are correct according to other threads I read here. So the powering order is probably not the issue? Or is UU not the correct display and it should show the number of the i2c address itself? Or do you mean something else with "the steps you took to set up the software"?

    Best Regards

    Richard

  • Hi Richard,

    Could you explain how you built the SDK? It seems like you are using the Edge AI image.

    Thank you,

    Fabiana

  • We built the image according to the instructions, in local.conf
    ARAGO_BRAND = "adas"
    ARAGO_RT_ENABLE = "1"
    command
    MACHINE="j784s4-evm" bitbake -k tisdk-adas-image -f
    but the kernel configuration was made by the command
    MACHINE="j784s4-evm" bitbake -k linux-ti-staging-rt -c do_menuconfig
    since adding fragment.cfg to bbappend file did not work
  • Hi Richard,

    Is there a reason for building with RT Linux Kernel? What is your target use case? Have you attempted to capture video from the IMX390? If so, which command(s) have you tried running and could you share the output logs? Could you also share the output of media-ctl -p and v4l2-ctl --list-devices ?

    Thank you,

    Fabiana

  • We need the RT linux kernel because we target to run many processes and want to make sure the camera access has a real-time priority as it is safety critical for us that the camera pipeline runs uninterrupted.

    Running the commands you asked for with the setup described in the first post looks like this:

    root@ve-vob-0001a:/opt/edgeai-gst-apps# ./init_script.sh 
    terminate called after throwing an instance of 'std::runtime_error'
      what():  No modesetting DRM card found
    root@ve-vob-0001a:/opt/edgeai-gst-apps# 
    root@ve-vob-0001a:/opt/edgeai-gst-apps# 
    root@ve-vob-0001a:/opt/edgeai-gst-apps# media-ctl -p
    Failed to enumerate /dev/media0 (-2)
    root@ve-vob-0001a:/opt/edgeai-gst-apps# v4l2-ctl --list-devices
    wave5-dec (platform:wave5-dec):
    	/dev/video0
    	/dev/video2
    
    wave5-enc (platform:wave5-enc):
    	/dev/video1
    	/dev/video3
    
    

    When I remove the k3-j784s4-vision-apps.dtbo from the overlays in the uEnv.txt I get the following output

    root@ve-vob-0001a:/opt/edgeai-gst-apps# ./init_script.sh 
    root@ve-vob-0001a:/opt/edgeai-gst-apps# media-ctl -p
    Media controller API version 6.1.80
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:4500000.ticsi2rx
    hw revision     0x1
    driver version  6.1.80
    
    Device topology
    - entity 1: 4500000.ticsi2rx (9 pads, 0 link, 0 route)
                type V4L2 subdev subtype Unknown flags 0
    	pad0: Sink
    	pad1: Source
    	pad2: Source
    	pad3: Source
    	pad4: Source
    	pad5: Source
    	pad6: Source
    	pad7: Source
    	pad8: Source
    
    - entity 11: cdns_csi2rx.4504000.csi-bridge (5 pads, 1 link, 0 route)
                 type V4L2 subdev subtype Unknown flags 0
    	pad0: Sink
    		<- "ds90ub960 3-003d":4 [ENABLED,IMMUTABLE]
    	pad1: Source
    	pad2: Source
    	pad3: Source
    	pad4: Source
    
    - entity 17: ds90ub960 3-003d (6 pads, 2 links, 0 route)
                 type V4L2 subdev subtype Unknown flags 0
    	pad0: Sink
    		<- "ds90ub953 3-0044":1 [ENABLED,IMMUTABLE]
    	pad1: Sink
    	pad2: Sink
    	pad3: Sink
    	pad4: Source
    		-> "cdns_csi2rx.4504000.csi-bridge":0 [ENABLED,IMMUTABLE]
    	pad5: Source
    
    - entity 26: ds90ub953 3-0044 (2 pads, 1 link, 0 route)
                 type V4L2 subdev subtype Unknown flags 0
    	pad0: Sink
    	pad1: Source
    		-> "ds90ub960 3-003d":0 [ENABLED,IMMUTABLE]
    
    root@ve-vob-0001a:/opt/edgeai-gst-apps# v4l2-ctl --list-devices
    TI-CSI2RX (platform:4500000.ticsi2rx):
    	/dev/media0
    
    TI-CSI2RX (platform:4510000.ticsi2rx):
    	/dev/media1
    
    TI-CSI2RX (platform:4520000.ticsi2rx):
    	/dev/media2
    
    wave5-dec (platform:wave5-dec):
    	/dev/video0
    	/dev/video2
    
    wave5-enc (platform:wave5-enc):
    	/dev/video1
    	/dev/video3
    
    

    That looks not bad, so I guess we are close to running the cameras soon. The problem is that we need the k3-j784s4-vision-apps.dtbo because we want to run tiovxldc which only works when this dtbo file is loaded.

    One additional problem remains is that ./init_script.sh does not output anything.

    root@ve-vob-0001a:/opt/edgeai-gst-apps# ./init_script.sh
    root@ve-vob-0001a:/opt/edgeai-gst-apps#
    
    

  • Hi Richard,

    Based off the logs you shared, the fusion board is being detected but the cameras are not. Could you share which imx390 sensors you are using? If the sensors you are using have built-in ISP, it would not be supported. If the sensor does not have built-in ISP, try swapping CSI ports. When you do this, don't forget to swap the dtbo as well.

    As Nikhil has previously mentioned, including the vision apps dtbo to uEnv.txt will disable csirx and dss. The tiovxldc GStreamer plugin works without this overlay.

    Thank you,

    Fabiana

  • We use the regular IMX390 cameras from Sensing without built-in ISP. Should these work out of the box or should we order IMX390 cameras from D3 Engineering for example?

    Without loading the vision apps the tiovxldc will crash, I am pretty sure about that. But this is a different topic and I will create a new thread for it once the cameras are working which is more urgent right now.

  • Hi Richard,

    Due to a US holiday, there will a delay in my response. Thanks for understanding.

    -Fabiana

  • Hi Fabiana,

    I hope you had a great independence day. Do you have by chance some new input on the camera topic?

    Best regards

    Richard

  • Our expert handling this topic is currently out of the office; please expect a 1-2 day delay in response.

    Thanks.

  • Hi Richard,

    I have only used the IMX390 sensors from D3 Engineering, but if the sensing sensors do not have built in ISP, it should work out of box. Could you share the link to the exact sensor you purchased?

    Thank you,

    Fabiana

  • Hi Fabiana, 

    you are right the Sensing cameras have a built-in ISP. 
    https://www.sensing-world.com/en/pd.jsp?id=34#_jcp=2

    We will order D3 Engineering cameras without ISP.

    Best regards
    Richard

  • Hi Richard,

    It is possible for you to proceed with the Sensing camera but the support to enable this will be limited. If you're interested in seeing what it would take to go this route, there is a thread that discusses this here: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1233573/sk-am62a-lp-debug-about-csi2rx

    If you plan to go with the D3 Engineering IMX390 rugged camera module, it should work as expected. If you experience any issues, please let us know. Closing this thread.

    Thank you,

    Fabiana