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.

AM623: OV5640 demo on HDMI monitor

Part Number: AM623

Followed the guide here, to add the device tree overlyay (k3-am625-sk-csi2-ov5640.dtbo). Using the TI SK62x-EVM and Digilent OV5640 connected to HDMI monitor. Power from USB-C on a 5V/3A charger.

https://dev.ti.com/tirex/explore/node?node=A__AGGwC8s5LnwYqZWBKS34ew__linux_academy_am62x__XaWts8R__LATEST

It seems very inconsistent/flakey. Tried 2x different monitors and 2x different camera modules.

Firstly, sometimes when board starts up I get a grey desktop looking screen. Othertimes I get the Motor (HMI?) Demo.

Sometimes when I run v4l2-ctl --list-devices I don't get the /dev/video0-4 devices, sometimes I do. A power cycle usually fixes that.

Next, If  I enter: 

/etc/init.d/weston restart

I get back

Stopping Weston
Starting Weston
Waiting for input device...


Sometimes this will then display the camera full screen, or sometimes I get black screen with "Please Wait..." for a few seconds then goes back to the the grey screen. If I do get the camera to display it usually only lasts 20 seconds or so.

If I enter:

gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=640, height=480 ! waylandsink

I get back:

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
WARNING: from element /GstPipeline:pipeline0/GstWaylandSink:waylandsink0: Could not initialise Wayland output
Additional debug info:
../gst-plugins-bad-1.16.3/ext/wayland/gstwaylandsink.c(359): gst_wayland_sink_find_display (): /GstPipeline:pipeline0/GstWaylandSink:waylandsink0:
Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)''
Setting pipeline to NULL ...
Freeing pipeline ...

Or sometimes:

gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw , width=640, height=480 ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
<<<HANGS HERE WITH NO DISPLAY, CTRL-C EXITS IT>>>>

Dmesg doesn't show any problems. Using a UVC USB Camera seems a lot more consistent, and the camera image is shown on top of the Motor GUI as a small box, rather than fullscreen. It runs forever without fail.

I can use the following command and it seems to capture the CSI Camera OV5640 to a file OK, so the problem seems to be more with the display, but then that doesn't make much sense why the USB Camera would work fine... 

gst-launch-1.0 v4l2src num-buffers=50 device="/dev/video0" ! video/x-raw, width=640, height=480 ! filesink location=cam-cap.yuv