Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

Graphics, sound and multimedia • Re: RPI 5 get RAW16 from FPGA using dummy_sensor

$
0
0
I very much appreciate all the advice so far @6by9.

It's never that easy, is it...

Here's the setup:

Code:

media-ctl -d /dev/media0 -rmedia-ctl -d /dev/media0 -l ''\''csi2'\'':4 -> '\''rp1-cfe-csi2_ch0'\'':0 [1]'media-ctl -d /dev/media0 -V ''\''csi2'\'':0 [fmt:Y16_1X16/1280x800 field:none field:none]'media-ctl -d /dev/media0 -V ''\''csi2'\'':4 [fmt:Y16_1X16/1280x800 field:none field:none]'v4l2-ctl -v width=1280,height=800,pixelformat='Y16 '
Media controller:

Code:

robc@raspberrypi:/ $ media-ctl -d /dev/media0 -pMedia controller API version 6.6.30Media device information------------------------driver          rp1-cfemodel           rp1-cfeserial          bus info        platform:1f00128000.csihw revision     0x114666driver version  6.6.30Device topology- entity 1: csi2 (8 pads, 8 links, 0 routes)            type V4L2 subdev subtype Unknown flags 0            device node name /dev/v4l-subdev0        pad0: SINK                [stream:0 fmt:Y16_1X16/1280x800 field:none]                <- "dummy_csi2_sensor":0 [ENABLED,IMMUTABLE]        pad1: SINK                [stream:0 fmt:unknown/16384x1 field:none]        pad2: SINK                [stream:0 fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]        pad3: SINK                [stream:0 fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]        pad4: SOURCE                [stream:0 fmt:Y16_1X16/1280x800 field:none]                -> "rp1-cfe-csi2_ch0":0 [ENABLED]                -> "pisp-fe":0 []        pad5: SOURCE                [stream:0 fmt:unknown/16384x1 field:none]                -> "rp1-cfe-embedded":0 []        pad6: SOURCE                [stream:0 fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]                -> "rp1-cfe-csi2_ch2":0 []                -> "pisp-fe":0 []        pad7: SOURCE                [stream:0 fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]                -> "rp1-cfe-csi2_ch3":0 []                -> "pisp-fe":0 []- entity 10: pisp-fe (5 pads, 7 links, 0 routes)             type V4L2 subdev subtype Unknown flags 0             device node name /dev/v4l-subdev1        pad0: SINK,MUST_CONNECT                [stream:0 fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]                <- "csi2":4 []                <- "csi2":6 []                <- "csi2":7 []        pad1: SINK                [stream:0 fmt:FIXED/16384x1 field:none]                <- "rp1-cfe-fe_config":0 []        pad2: SOURCE                [stream:0 fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]                -> "rp1-cfe-fe_image0":0 []        pad3: SOURCE                [stream:0 fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]                -> "rp1-cfe-fe_image1":0 []        pad4: SOURCE                [stream:0 fmt:FIXED/16384x1 field:none]                -> "rp1-cfe-fe_stats":0 []- entity 16: dummy_csi2_sensor (1 pad, 1 link, 0 routes)             type V4L2 subdev subtype Sensor flags 0             device node name /dev/v4l-subdev2        pad0: SOURCE                [stream:0 fmt:Y16_1X16/1280x800 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range                 crop:(0,0)/1280x800]                -> "csi2":0 [ENABLED,IMMUTABLE]- entity 18: rp1-cfe-csi2_ch0 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video0        pad0: SINK,MUST_CONNECT                <- "csi2":4 [ENABLED]- entity 22: rp1-cfe-embedded (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video1        pad0: SINK,MUST_CONNECT                <- "csi2":5 []- entity 26: rp1-cfe-csi2_ch2 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video2        pad0: SINK,MUST_CONNECT                <- "csi2":6 []- entity 30: rp1-cfe-csi2_ch3 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video3        pad0: SINK,MUST_CONNECT                <- "csi2":7 []- entity 34: rp1-cfe-fe_image0 (1 pad, 1 link)             type Node subtype V4L flags 1             device node name /dev/video4        pad0: SINK,MUST_CONNECT                <- "pisp-fe":2 []- entity 38: rp1-cfe-fe_image1 (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video5        pad0: SINK,MUST_CONNECT                <- "pisp-fe":3 []- entity 42: rp1-cfe-fe_stats (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video6        pad0: SINK,MUST_CONNECT                <- "pisp-fe":4 []- entity 46: rp1-cfe-fe_config (1 pad, 1 link)             type Node subtype V4L flags 0             device node name /dev/video7        pad0: SOURCE,MUST_CONNECT                -> "pisp-fe":1 []
Attempt to get some output. This creates a 0 byte "frame.jpg" file and hangs until I CTRL-C it.

Code:

robc@raspberrypi:/ $ v4l2-ctl --verbose --device /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat='Y16 ' --stream-mmap --stream-to=frame.jpg --stream-count=1VIDIOC_QUERYCAP: okVIDIOC_G_FMT: okVIDIOC_S_FMT: okFormat Video Capture:        Width/Height      : 1280/800        Pixel Format      : 'Y16 ' (16-bit Greyscale)        Field             : None        Bytes per Line    : 2560        Size Image        : 2048000        Colorspace        : Raw        Transfer Function : None        YCbCr/HSV Encoding: ITU-R 601        Quantization      : Full Range        Flags             : could not open frame.jpg for writing                VIDIOC_REQBUFS returned 0 (Success)                VIDIOC_QUERYBUF returned 0 (Success)                VIDIOC_QUERYBUF returned 0 (Success)                VIDIOC_QUERYBUF returned 0 (Success)                VIDIOC_QUERYBUF returned 0 (Success)                VIDIOC_QBUF returned 0 (Success)                VIDIOC_QBUF returned 0 (Success)                VIDIOC_QBUF returned 0 (Success)                VIDIOC_QBUF returned 0 (Success)                VIDIOC_STREAMON returned 0 (Success)
dmesg: errors and warnings

Code:

dmesg --level=err,warn....[ 1444.515348] v4l2_get_link_freq: Link frequency estimated using pixel rate: result might be inaccurate[ 1444.515356] v4l2_get_link_freq: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver[ 1444.515419] rp1-cfe 1f00128000.csi: DPHY: Datarate 0 Mbps out of range
Hmm...Is this telling me something wrong with my FPGA output? I can measure the FPGA is generating CSI2 output on a scope with a 500 MHz clock.

Statistics: Posted by RLC — Fri Apr 25, 2025 5:33 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles