zdma
Xilinx SDK Drivers API Documentation
xzdma_writeonlymode_example.c File Reference

Overview

This file contains the example using XZDma driver to do simple data transfer in Write only mode on ZDMA device.

In this mode data will be predefined and will be repetitively written into the given address and for given size. For ADMA only 2 words are repeated and for GDMA 4 words are repeated.

MODIFICATION HISTORY:
Ver   Who     Date     Changes

1.0 vns 2/27/15 First release ms 04/05/17 Modified comment lines notation in functions to avoid unnecessary description to get displayed while generating doxygen. 1.3 mus 08/14/17 Do not perform cache operations if CCI is enabled 1.4 adk 11/02/17 Updated example to fix compilation errors for IAR compiler.

Macros

#define ZDMA_INTC_DEVICE_ID   XPAR_SCUGIC_SINGLE_DEVICE_ID
 SCUGIC Device ID. More...
 
#define ZDMA_INTR_DEVICE_ID   XPAR_XADMAPS_0_INTR
 ZDMA Interrupt Id. More...
 

Functions

int XZDma_WriteOnlyExample (u16 DeviceId)
 This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver. More...
 
u32 DstBuf [300] __attribute__ ((aligned(64)))
 Destination buffer. More...
 
int main (void)
 Main function to call the example. More...
 

Variables

XZDma ZDma
 Instance of the ZDMA Device. More...
 
XScuGic Intc
 XIntc Instance. More...
 
u32 SrcBuf [4]
 Source buffer. More...
 
u8 Done = 0
 Done Flag for interrupt generation. More...
 

Macro Definition Documentation

◆ ZDMA_INTC_DEVICE_ID

#define ZDMA_INTC_DEVICE_ID   XPAR_SCUGIC_SINGLE_DEVICE_ID

SCUGIC Device ID.

◆ ZDMA_INTR_DEVICE_ID

#define ZDMA_INTR_DEVICE_ID   XPAR_XADMAPS_0_INTR

ZDMA Interrupt Id.

Function Documentation

◆ __attribute__()

u32 DstBuf [300] __attribute__ ( (aligned(64))  )

Destination buffer.

◆ main()

int main ( void  )

Main function to call the example.

Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None.

References XZDma_WriteOnlyExample().

◆ XZDma_WriteOnlyExample()

int XZDma_WriteOnlyExample ( u16  DeviceId)

This function does a test of the data transfer in simple mode of write only mode on the ZDMA driver.

Parameters
DeviceIdis the XPAR_<ZDMA Instance>_DEVICE_ID value from xparameters.h.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if failed.
Note
None.

References XZDma_Config::BaseAddress, XZDma_CfgInitialize(), XZDma_EnableIntr, XZDMA_IXR_DMA_DONE_MASK, XZDma_LookupConfig(), XZDma_SelfTest(), XZDma_SetMode(), and XZDMA_WRONLY_MODE.

Referenced by main().

Variable Documentation

◆ Done

u8 Done = 0

Done Flag for interrupt generation.

◆ Intc

XScuGic Intc

XIntc Instance.

◆ SrcBuf

u32 SrcBuf[4]

Source buffer.

◆ ZDma

XZDma ZDma

Instance of the ZDMA Device.