We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Observer li_zicong
Registered: ‎04-28-2017

VDMA park mode problem


Lately, I have been using VDMA to set up my video system, but some weird problem came up. I hope anyone can give me some suggestion. Thank you in advance!

My goal is that video stream can function well from camera to display, at the same time, ARM can run its own calculation program and draw a rectangular in the HDMI display.


Problem 1: Can my goal be achieved?


So far, I have set up a video system which functions perfectly from camera to display via VDMA. The input and output resolution is both480*640. Five input clocks of VDMA is 100Mhz produced from Port FCLK_CLK0 in ZYNQ7 Processing System.

================= configuration & code ==================
Vivado: 2015.4
SDK: 2015.4
Hardware: ZC706

VDMA configuration is as below.


Source code in SDK:

int main()
     print("Hello World\n\r");

      /***************** write path configuration **********************/
       Xil_Out32((VDMA_BASEADDR + 0x030), 0x00000003);// enable circular mode
      // Xil_Out32((VDMA_BASEADDR + 0x030), 0x00000001);// enable park mode
       Xil_Out32((VDMA_BASEADDR + 0x0AC), VIDEO_BASEADDR0); // start address
       Xil_Out32((VDMA_BASEADDR + 0x0B0), VIDEO_BASEADDR1); // start address
       Xil_Out32((VDMA_BASEADDR + 0x0B4), VIDEO_BASEADDR2); // start address
       Xil_Out32((VDMA_BASEADDR + 0x0A8), (H_STRIDE*4)); // h offset (640 * 4) bytes
       Xil_Out32((VDMA_BASEADDR + 0x0A4), (H_ACTIVE*4)); // h size (640 * 4) bytes
       Xil_Out32((VDMA_BASEADDR + 0x0A0), V_ACTIVE); // v size (480)
       /***************** read path configuration **********************/
      Xil_Out32((VDMA_BASEADDR + 0x000), 0x00000003); // enable circular mode
      // Xil_Out32((VDMA_BASEADDR + 0x000), 0x00000001); // enable park mode
      Xil_Out32((VDMA_BASEADDR + 0x05c), VIDEO_BASEADDR0); // start address
      Xil_Out32((VDMA_BASEADDR + 0x060), VIDEO_BASEADDR1); // start address
      Xil_Out32((VDMA_BASEADDR + 0x064), VIDEO_BASEADDR2); // start address
      Xil_Out32((VDMA_BASEADDR + 0x058), (H_STRIDE*4)); // h offset (640 * 4) bytes
      Xil_Out32((VDMA_BASEADDR + 0x054), (H_ACTIVE*4)); // h size (640 * 4) bytes
      Xil_Out32((VDMA_BASEADDR + 0x050), V_ACTIVE); // v size (480)


      // read register to check

      xil_printf("write mode = %x\r\n", Xil_In32(VDMA_BASEADDR + 0x030));
      xil_printf("read mode = %x\r\n", Xil_In32(VDMA_BASEADDR + 0x000));
      xil_printf("PARK_PTR_REG = %x\r\n", Xil_In32(VDMA_BASEADDR + 0x028));


      // ======== for test ========
      int i;
      int* data0 = (int*)calloc(60000, sizeof(int));
      for(i = 0; i<60000; i++) data0[i] = i;
      xil_printf("Taking bus\r\n");
      // ======== for test ========


      return 0;


=====================  running result  =========================
Video stream works perfectly from camera to display! But the output in SDK Terminal is as below. It shows that the program does not reachxil_printf("Taking bus\r\n").

Hello World


write mode = 10003
read mode = 10003


Problem 2: Why does the program can't get to xil_printf("Taking bus\r\n")?



============= after modifying software or hardware =================
Problem 3: According to pg020_axi_vdma, we can set up our own frame buffer mechanism by setting MM2S_VDMACR.Curcular_Park to0, so I modified the main() to enable park mode and check it. The weird thing is all the result is still the same! Video stream is still fine and the output in SDK terminal doesn't change except for the write mode and read mode. And then, I modified the VDMA configuration like fsync option are set to s2mm_sync and mm2s_sync, and the result is the same. Why? I'm confused.



Thanks and Regards,
Zicong Li

Tags (2)
0 Kudos
3 Replies
Registered: ‎10-04-2017

Re: VDMA park mode problem

Hi @li_zicong,


To start, I would recommend upgrading Vivado versions as you are just starting a new design.


Problem 1.

Without knowing your full design requirements, I would say that yes this is possible.



I would suggest using the JTAG debugger and stepping through your code. It looks like there is an issue with your dynamic memory allocation. I am not an embedded specialist, but I think that it is unusual to use dynamic memory allocation.



Without seeing your full system configuration, it is hard to answer this. Can you attach your IPI design?







Don't forget to reply, kudo, and accept as solution.

Xilinx Video Design Hub
0 Kudos
Registered: ‎11-09-2015

Re: VDMA park mode problem

Hi @li_zicong,


Do you have any updates on this? Was the reply from @samk enough for you?


If your question is answered or your issue is solved, please kindly mark the response which helped as solution (click on "Accept as solution" button below the reply)

If this is not solved/answered, please reply in the topic giving more information on your current status.

Thanks and Regards,

Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor wangxiaoming
Registered: ‎11-08-2018

Re: VDMA park mode problem

Problem 2: Try increasing the heap size.