Jump to content
  • 0

Video capture in Petalinux on Zybo


David B

Question

Hi,

 

I have a Digilent Zybo z7-20 board and I took the Linux base vivado project and compiled the petalinux from Digilent's GitHub . The os is working fine.

I observed a dvi2rgb block which terminates in video memory access and also, in petalinux repo, it's specified that there is a hdmi in via uio.

My question is: how can I get a picture from hdmi via user space io. 

 

Thank you!Merry Christmas!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @Ben B,

Regarding your question on using Zybo Z7-20 to capture HDMI signals. It is possible and using UIO is also an option, but because we are using the VDMA to get the Video signal it's better to use a DMA driver. Unfortunately Xilinx does not provide a complete DMA driver for any of their DMA IPs, therefore I have been using this DMA driver which includes the VDMA functionality as well. To make things as easy as possible, I generated a example project for you with the VDMA used to capture video streams and OpenCV functions to write a *.bmp file.

 

What you need to do in order to get it working is:

1. load the HDMI2BMP.elf to /home/root on your rootfs portion of your board 

2. after the board boots you need to load the axi_dma_driver

root@Zybo-Z7-20:~# insmod /lib/modules/4.9.0-xilinx-v2017.4/extra/xilinx-axidma.ko

3. run the HDMI2BMP.elf

This will generate a test.bmp in /home/root with the captured image.

 

The source file for the app is in the SDK folder. Changes which I had to do to the original petalinux project are:

- create a new module in petalinux

petalinux-create -t modules -n xilinx-axidma --enable

- copy the necessary file to Petalinux-Zybo-Z7-20/Zybo-Z7-20/project-spec/meta-user/recipes-modules/xilinx-axidma/files and update the MAKE file and the xilinx-axidma.bb

- update the system-user.dtsi in /Petalinux-Zybo-Z7-20/Zybo-Z7-20/project-spec/meta-user/recipes-bsp/device-tree/files

- write the demo program

 

 

Hope this helps.

-Ciprian

Zybo-Z7-20-HDMI-RX_peta.zip

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...