cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
1,153 Views
Registered: ‎02-18-2013

Zybo AXI VDMA doesn´t work

Jump to solution

Hello,

I want to use VGA on my Zybo. So I decide to use the AXI VDMA and the Video Timing Generator. My block diagram looks like this.VGA.png

And my code is this

#include "xaxivdma.h"
#include "xparameters.h"

XAxiVdma* InstancePtr;

int main()
{
	xil_printf("Configure VDMA...\n\r");
	XAxiVdma_Config *Config;

	Config = XAxiVdma_LookupConfig(XPAR_AXI_VDMA_0_DEVICE_ID);
	if (!Config) {
		xil_printf("No video DMA found for ID %d\r\n", XPAR_AXI_VDMA_0_DEVICE_ID);
		return XST_FAILURE;
	}

	/* Initialize DMA engine */
	u32 status = XAxiVdma_CfgInitialize(InstancePtr, Config, Config->BaseAddress);
	if (status != XST_SUCCESS)
	{
		xil_printf("Configuration Initialization failed, status: 0x%X\r\n", status);
		return status;
	}

	xil_printf("Start...\n\r");

	while(1)
	{
	}

	return 0;
}

But this program stucks at this line

u32 status = XAxiVdma_CfgInitialize(InstancePtr, Config, Config->BaseAddress);

So what´s wrong with this?

Tags (2)
0 Kudos
Reply
1 Solution

Accepted Solutions
Explorer
Explorer
980 Views
Registered: ‎02-18-2013

I found the error. The XAxiVdma-Pointer is initialized with NULL, so the Assert in the VDMA-Driver got triggered. I changed it from

XAxiVdma* Pointer;
XAxiVdma_CfgInitialize(Pointer, Config, Config->BaseAddress);

to

XAxiVdma Instance;
XAxiVdma_CfgInitialize(&Instance, Config, Config->BaseAddress);

It works now...

Next step is a VGA image :)

View solution in original post

0 Kudos
Reply
5 Replies
Teacher
Teacher
1,094 Views
Registered: ‎06-16-2013

Hi @kampi 

 

I suggest you to make sure input floating, ex. Intterrupt and Video Timing modules, and the polarity of Reset.

 

Would you try it ?

 

Best regards,

0 Kudos
Reply
Moderator
Moderator
1,053 Views
Registered: ‎11-09-2015

Hi @kampi ,

I would agree with @watari . The first thing to check is looking at the reset. The IP might be held in reset.

I would also try do debug step by step your application and see exactly when it is failing inside the function XAxiVdma_CfgInitialize.

Also, you might want to check my video series 24 for an example using the VDMA. I am not using the VDMA driver's APIs but you can refer the design as an example.

Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Reply
Explorer
Explorer
1,015 Views
Registered: ‎02-18-2013

Hello,

thank you for your answer. I will test it :)

0 Kudos
Reply
Explorer
Explorer
981 Views
Registered: ‎02-18-2013

I found the error. The XAxiVdma-Pointer is initialized with NULL, so the Assert in the VDMA-Driver got triggered. I changed it from

XAxiVdma* Pointer;
XAxiVdma_CfgInitialize(Pointer, Config, Config->BaseAddress);

to

XAxiVdma Instance;
XAxiVdma_CfgInitialize(&Instance, Config, Config->BaseAddress);

It works now...

Next step is a VGA image :)

View solution in original post

0 Kudos
Reply
Moderator
Moderator
963 Views
Registered: ‎11-09-2015

Hi @kampi ,

Good to know that you were able to solve your issue.

Could you kindly mark your previous reply as accepted solution (click on the accepet as solution button while logged in).

Kind Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Reply