SK-AM62: cannot capture images at 1080P30 with camera OV5640(ALINX AN5641)

Part Number: SK-AM62
Other Parts Discussed in Thread: AM62P

Tool/software:

according to this advice,i used ALINX AN5641 on the AM62P EVM to test 1080p30 display and encoding.
I tried two ov5640.dtbo in the PROCESSOR-SDK-LINUX-AM62P(10.00.07.04),none of them worked.
  1. k3-am62x-sk-csi2-ov5640.dtbo:The frame rate is 30 frames, but the image is abnormal.
  2. k3-am62x-sk-csi2-tevi-ov5640.dtbo:The image is normal, but the frame rate is only 15 frames at all resolutions.

log for k3-am62x-sk-csi2-ov5640.dtbo:

root@am62pxx-evm:/mnt/nfs/camera# ./ov5640.sh 
+ systemctl stop weston
Stopping 'weston.service', but its triggering units are still active:
weston.socket
+ media-ctl -V '"ov5640 4-003c":0 [fmt:YUYV8_1X16/1920x1080@1/30 field:none]'
+ media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
+ media-ctl -V '"30102000.ticsi2rx":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
+ gst-launch-1.0 -v v4l2src device=/dev/video2 '!' video/x-raw, width=1920, height=1080,format=YUY2,framerate=30/1 '!' fpsdisplaysink video-sink=waylandsink
Setting pipeline to PAUSED ...
[  310.864828] audit: type=1006 audit(316.744:23): pid=1301 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=6 res=1
[  310.876862] audit: type=1300 audit(316.744:23): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffed81bf38 a2=4 a3=1 items=0 ppid=1 pid=1301 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty7 ses=6 comm="(weston)" exe="/usr/lib/systemd/systemd-executor" key=(null)
[  310.902855] audit: type=1327 audit(316.744:23): proctitle="(weston)"
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0: sync = true
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
Redistribute latency...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 15, dropped: 0, current: 29.14, average: 29.14
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 15, dropped: 0, current: 29.14, average: 29.14
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 30, dropped: 0, current: 29.39, average: 29.27
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 30, dropped: 0, current: 29.39, average: 29.27
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 46, dropped: 0, current: 30.02, average: 29.52
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 46, dropped: 0, current: 30.02, average: 29.52
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 62, dropped: 0, current: 30.00, average: 29.65
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 62, dropped: 0, current: 30.00, average: 29.65
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 78, dropped: 0, current: 30.00, average: 29.72
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 78, dropped: 0, current: 30.00, average: 29.72
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 93, dropped: 0, current: 29.94, average: 29.75
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 93, dropped: 0, current: 29.94, average: 29.75
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 109, dropped: 0, current: 30.00, average: 29.79

log for tevi-ov5640.dtbo:

root@am62pxx-evm:/mnt/nfs/camera# ./ov5640.sh 
+ systemctl stop weston
Stopping 'weston.service', but its triggering units are still active:
weston.socket
+ media-ctl -V '"ov5640 4-003c":0 [fmt:YUYV8_1X16/1920x1080@1/30 field:none]'
+ media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
+ media-ctl -V '"30102000.ticsi2rx":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
+ gst-launch-1.0 -v v4l2src device=/dev/video2 '!' video/x-raw, width=1920, height=1080,format=YUY2,framerate=30/1 '!' fpsdisplaysink video-sink=waylandsink
Setting pipeline to PAUSED ...
[   41.557842] kauditd_printk_skb: 5 callbacks suppressed
[   41.557856] audit: type=1006 audit(47.632:21): pid=1268 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=4 res=1
[   41.575022] audit: type=1300 audit(47.632:21): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=fffff5a81658 a2=4 a3=1 items=0 ppid=1 pid=1268 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty7 ses=4 comm="(weston)" exe="/usr/lib/systemd/systemd-executor" key=(null)
[   41.601003] audit: type=1327 audit(47.632:21): proctitle="(weston)"
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0: sync = true
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
Redistribute latency...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstWaylandSink:waylandsink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 9, dropped: 0, current: 16.94, average: 16.94
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 9, dropped: 0, current: 16.94, average: 16.94
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 17, dropped: 0, current: 14.70, average: 15.80
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 17, dropped: 0, current: 14.70, average: 15.80
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 25, dropped: 0, current: 15.04, average: 15.55
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 25, dropped: 0, current: 15.04, average: 15.55
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 33, dropped: 0, current: 15.00, average: 15.41
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 33, dropped: 0, current: 15.00, average: 15.41
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 41, dropped: 0, current: 15.00, average: 15.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 41, dropped: 0, current: 15.00, average: 15.33
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 49, dropped: 0, current: 15.00, average: 15.28
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 49, dropped: 0, current: 15.00, average: 15.28
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 57, dropped: 0, current: 15.00, average: 15.24
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 57, dropped: 0, current: 15.00, average: 15.24
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 65, dropped: 0, current: 15.00, average: 15.21
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 65, dropped: 0, current: 15.00, average: 15.21

The node info is the same in both cases:

root@am62pxx-evm:/mnt/nfs/camera# media-ctl -d /dev/media0 -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:YUYV8_1X16/1920x1080 field:none]
                <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
                -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
        pad2: Source
                -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
        pad3: Source
                -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
        pad4: Source
                -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
        pad5: Source
                -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
        pad6: Source
                -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        routes:
                0/0 -> 1/0 [ACTIVE]
        pad0: Sink
                [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
                <- "ov5640 4-003c":0 [ENABLED,IMMUTABLE]
        pad1: Source
                [stream:0 fmt:YUYV8_1X16/1920x1080 field:none]
                -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
        pad2: Source
        pad3: Source
        pad4: Source

- entity 15: ov5640 4-003c (1 pad, 1 link, 0 routes)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
        pad0: Source
                [stream:0 fmt:YUYV8_1X16/1920x1080@1/30 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
                 crop.bounds:(0,0)/2624x1964
                 crop:(336,434)/1952x1088]
                -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

  • Hi Linyang,

    Can you try v4l2 streaming and see if it gives you 30fps, for example:

    v4l2-ctl -d2 --set-fmt-video=width=1920,height=1080,pixelformat='YUYV'  --stream-mmap

    Thank you.

    Jianzhong

  • k3-am62x-sk-csi2-tevi-ov5640.dtbo gives 15fps

    root@am62pxx-evm:/mnt/nfs/camera# tail -1 /run/media/boot-mmcblk1p1/uEnv.txt                                    
    name_overlays=ti/k3-am62x-sk-csi2-tevi-ov5640.dtbo                                                              
    root@am62pxx-evm:/mnt/nfs/camera# v4l2-ctl -d2 --set-fmt-video=width=1920,height=1080,pixelformat='YUYV'  --stre
    am-mmap                                                                                                         
    <<<<<<<<<<<<<<<<< 15.00 fps                                                                                     
    <<<<<<<<<<<<<<< 15.00 fps                                                                                       
    <<<<<<<<<<<<<<< 15.00 fps                                                                                       
    <<<<<<<<<<<<<<< 15.00 fps                                                                                       
    <<<<<<<<<^C