Jump to content
  • 0

Can't get image from PCam 5C running on Zybo Z7-20 with petalinux


shantaramj

Question

Hello folks,


I am running Zybo Z7-20 Pcam petalinux project on Zybo Z7-20 board.

From README.md file below command will create 14 image files in current directory

 yavta -c14 -f YUYV -s "$width"x"$height" -F /dev/video0

when we test similarly our log stucks as per below

root@test0:~# yavta -c1 -f YUYV -s "$width"x"$height" -F /dev/video0
Device /dev/video0 opened.
Device `video_cap output 0' on `platform:video_cap:0' is a video output (without mplanes) device.
Video format set: YUYV (56595559) 1280x720 field none, 1 planes:
 * Stride 2560, buffer size 1843200
Video format: YUYV (56595559) 1280x720 field none, 1 planes:
 * Stride 2560, buffer size 1843200
8 buffers requested.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xb6c29000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0xb6a67000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0xb68a5000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0xb66e3000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 4/0 mapped at address 0xb6521000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 5/0 mapped at address 0xb635f000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 6/0 mapped at address 0xb619d000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 7/0 mapped at address 0xb5fdb000.

from this we are not sure whether the images created or not.

when we run media device information command(media-ctl -p)

we get following log

root@test0:~# media-ctl -p
Media controller API version 4.9.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial          
bus info        
hw revision     0x0
driver version  4.9.0

Device topology
- entity 1: video_cap output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
    pad0: Sink
        <- "43c60000.mipi_csi2_rx_subsystem":0 [ENABLED]

- entity 5: ov5640 1-003c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
    pad0: Source
        [fmt:UYVY/1280x720 field:none]
        -> "43c60000.mipi_csi2_rx_subsystem":1 [ENABLED]

- entity 7: 43c60000.mipi_csi2_rx_subsystem (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
    pad0: Source
        [fmt:UYVY/1280x720 field:none]
        -> "video_cap output 0":0 [ENABLED]
    pad1: Sink
        [fmt:UYVY/1280x720 field:none]
        <- "ov5640 1-003c":0 [ENABLED]

when we run v4l2-ctl --all,


root@test0:~# v4l2-ctl --all
Driver Info (not using libv4l2):
    Driver name   : xilinx-vipp
    Card type     : video_cap output 0
    Bus info      : platform:video_cap:0
    Driver version: 4.9.0
    Capabilities  : 0x84201000
        Video Capture Multiplanar
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps   : 0x04201000
        Video Capture Multiplanar
        Streaming
        Extended Pix Format
Priority: 2
Format Video Capture Multiplanar:
    Width/Height      : 1280/720
    Pixel Format      : 'YUYV'
    Field             : None
    Number of planes  : 1
    Flags             :
    Colorspace        : Default
    Transfer Function : Default
    YCbCr Encoding    : Default
    Quantization      : Default
    Plane 0           :
       Bytes per Line : 2560
       Size Image     : 1843200
root@test0:~#


Please help, Thanks in advance

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

@shantaramj

After issuing command:

yavta -c14 -f YUYV -s "$width"x"$height" -F /dev/video0

List content of your current directory (ls -l) :

-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000000.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000001.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000002.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000003.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000004.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000005.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000006.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000007.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000008.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000009.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000010.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000011.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000012.bin
-rw-r--r--    1 root     root       4147200 Dec 16 12:57 frame-000013.bin

documentation:

Quote

The functions above will create 14 image files in your current directory.

Probably term `functions` is misleading it should be commands.

Link to comment
Share on other sites

  • 0

@Ionel

Thanks for reply, I solved my problem. There is clock issue in block design, after this I am successfully captured 14 images from mipi camera.

I have another issue regarding about frame buffer device. /dev directory is  not showing any /dev/fb0 device

boot log for xilinx drm driver as follows

[    1.509100] [drm] No max horizontal width in DT, using default 1920
[    1.515317] [drm] No max vertical height in DT, using default 1080
[    1.521578] OF: graph: no port node found in /amba_pl/xilinx_drm
[    1.527561] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.534160] [drm] No driver support for vblank timestamp query.
[    1.540396] [drm] Cannot find any crtc or sizes
[    1.545341] [drm] Initialized xilinx_drm 1.0.0 20130509 for amba_pl:xilinx_drm on minor 0

and device list under /dev directory

root@mipicam:/dev# ls
block               loop1               ram1                stderr              tty21               tty38               tty54               v4l-subdev0
bus                 loop2               ram10               stdin               tty22               tty39               tty55               v4l-subdev1
char                loop3               ram11               stdout              tty23               tty4                tty56               vcs
console             loop4               ram12               tty                 tty24               tty40               tty57               vcs1
cpu_dma_latency     loop5               ram13               tty0                tty25               tty41               tty58               vcsa
dri                 loop6               ram14               tty1                tty26               tty42               tty59               vcsa1
fd                  loop7               ram15               tty10               tty27               tty43               tty6                vga_arbiter
full                media0              ram2                tty11               tty28               tty44               tty60               video0
gpiochip0           mem                 ram3                tty12               tty29               tty45               tty61               watchdog
i2c-0               memory_bandwidth    ram4                tty13               tty3                tty46               tty62               watchdog0
i2c-1               mtab                ram5                tty14               tty30               tty47               tty63               zero
iio:device0         network_latency     ram6                tty15               tty31               tty48               tty7
iio:device1         network_throughput  ram7                tty16               tty32               tty49               tty8
initctl             null                ram8                tty17               tty33               tty5                tty9
kmsg                port                ram9                tty18               tty34               tty50               ttyPS0
log                 ptmx                random              tty19               tty35               tty51               udev_network_queue
loop-control        pts                 shm                 tty2                tty36               tty52               urandom
loop0               ram0                snd                 tty20               tty37               tty53               v4l

Snippet from device tree as follows

&amba_pl {
    encoder_0: digilent_encoder {
        compatible = "digilent,drm-encoder";
        digilent,fmax = <150000>;
        digilent,edid-i2c = <&i2c0>;
    };

    xilinx_drm {
        compatible = "xlnx,drm";
        xlnx,vtc = <&v_tc_out>;
        xlnx,connector-type = "HDMIA";
        xlnx,encoder-slave = <&encoder_0>;
        clocks = <&axi_dynclk_0>;
        planes {
            xlnx,pixel-format = "rgb888";
            plane0 {
                dmas = <&axi_vdma_1 0>;
                dma-names = "dma0";
            };
        };
    };
};

Thanks in advance

Link to comment
Share on other sites

  • 0

Hi @shantaramj

Can you please confirm if you used the  Zybo Z7-20 Pcam petalinux project in v2017.3/4 or upgraded it to v2019.1.
I am trying to do the same but validating the vivado design is giving me errors.

If you built in v2019.1 can you please let me know how?.
Thanks in advance, your time and help is highly appreciated.

 

Link to comment
Share on other sites

  • 0
On 12/14/2019 at 11:36 AM, shantaramj said:

Hello folks,


I am running Zybo Z7-20 Pcam petalinux project on Zybo Z7-20 board.

From README.md file below command will create 14 image files in current directory

 yavta -c14 -f YUYV -s "$width"x"$height" -F /dev/video0

when we test similarly our log stucks as per below

root@test0:~# yavta -c1 -f YUYV -s "$width"x"$height" -F /dev/video0
Device /dev/video0 opened.
Device `video_cap output 0' on `platform:video_cap:0' is a video output (without mplanes) device.
Video format set: YUYV (56595559) 1280x720 field none, 1 planes:
 * Stride 2560, buffer size 1843200
Video format: YUYV (56595559) 1280x720 field none, 1 planes:
 * Stride 2560, buffer size 1843200
8 buffers requested.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xb6c29000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0xb6a67000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0xb68a5000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0xb66e3000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 4/0 mapped at address 0xb6521000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 5/0 mapped at address 0xb635f000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 6/0 mapped at address 0xb619d000.
length: 1 offset: 3201100384 timestamp type/source: mono/EoF
Buffer 7/0 mapped at address 0xb5fdb000.

from this we are not sure whether the images created or not.

when we run media device information command(media-ctl -p)

we get following log

root@test0:~# media-ctl -p
Media controller API version 4.9.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial          
bus info        
hw revision     0x0
driver version  4.9.0

Device topology
- entity 1: video_cap output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
    pad0: Sink
        <- "43c60000.mipi_csi2_rx_subsystem":0 [ENABLED]

- entity 5: ov5640 1-003c (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev0
    pad0: Source
        [fmt:UYVY/1280x720 field:none]
        -> "43c60000.mipi_csi2_rx_subsystem":1 [ENABLED]

- entity 7: 43c60000.mipi_csi2_rx_subsystem (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
    pad0: Source
        [fmt:UYVY/1280x720 field:none]
        -> "video_cap output 0":0 [ENABLED]
    pad1: Sink
        [fmt:UYVY/1280x720 field:none]
        <- "ov5640 1-003c":0 [ENABLED]

when we run v4l2-ctl --all,


root@test0:~# v4l2-ctl --all
Driver Info (not using libv4l2):
    Driver name   : xilinx-vipp
    Card type     : video_cap output 0
    Bus info      : platform:video_cap:0
    Driver version: 4.9.0
    Capabilities  : 0x84201000
        Video Capture Multiplanar
        Streaming
        Extended Pix Format
        Device Capabilities
    Device Caps   : 0x04201000
        Video Capture Multiplanar
        Streaming
        Extended Pix Format
Priority: 2
Format Video Capture Multiplanar:
    Width/Height      : 1280/720
    Pixel Format      : 'YUYV'
    Field             : None
    Number of planes  : 1
    Flags             :
    Colorspace        : Default
    Transfer Function : Default
    YCbCr Encoding    : Default
    Quantization      : Default
    Plane 0           :
       Bytes per Line : 2560
       Size Image     : 1843200
root@test0:~#


Please help, Thanks in advance

 

I have the same issue, can you please tell me what was the clock issue you faced? 
Thank you 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...