![]() |
csudma
Vitis Drivers API Documentation
|
This file contains an example using the XCsuDma driver in polled mode.
This function works in loop back mode and tests whether transfer of data is completed properly or not.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 vnsld 22/10/14 First release 1.4 adk 04/12/17 Added support for PMC DMA. 1.14 adk 04/05/23 Added support for system device-tree flow.
Macros | |
#define | CSU_SSS_CONFIG_OFFSET 0x008 |
CSU SSS_CFG Offset. More... | |
#define | CSUDMA_LOOPBACK_CFG 0x00000050 |
LOOP BACK configuration macro. More... | |
#define | PMC_SSS_CONFIG_OFFSET 0x500 |
CSU SSS_CFG Offset. More... | |
#define | PMCDMA0_LOOPBACK_CFG 0x0000000D |
LOOP BACK configuration macro for PMCDMA0. More... | |
#define | PMCDMA1_LOOPBACK_CFG 0x00000090 |
LOOP BACK configuration macro for PMCDMA1. More... | |
#define | SIZE 0x100 |
Size of the data to be transfered. More... | |
Functions | |
u32 SrcBuf[SIZE] | __attribute__ ((aligned(64))) |
Destination buffer. More... | |
int | XCsuDma_PolledExample (u16 DeviceId) |
This function performs data transfer in loop back mode in polled mode and verify the data. More... | |
int | main (void) |
Main function to call the example. More... | |
Variables | |
XCsuDma | CsuDma |
Instance of the Csu_Dma Device. More... | |
#define CSU_SSS_CONFIG_OFFSET 0x008 |
CSU SSS_CFG Offset.
Referenced by XCsuDma_PolledExample().
#define CSUDMA_LOOPBACK_CFG 0x00000050 |
LOOP BACK configuration macro.
Referenced by XCsuDma_PolledExample().
#define PMC_SSS_CONFIG_OFFSET 0x500 |
CSU SSS_CFG Offset.
Referenced by XCsuDma_PolledExample().
#define PMCDMA0_LOOPBACK_CFG 0x0000000D |
LOOP BACK configuration macro for PMCDMA0.
Referenced by XCsuDma_PolledExample().
#define PMCDMA1_LOOPBACK_CFG 0x00000090 |
LOOP BACK configuration macro for PMCDMA1.
Referenced by XCsuDma_PolledExample().
#define SIZE 0x100 |
Size of the data to be transfered.
Referenced by XCsuDma_PolledExample().
u32 SrcBuf [SIZE] __attribute__ | ( | (aligned(64)) | ) |
Destination buffer.
Source buffer.
int main | ( | void | ) |
Main function to call the example.
int XCsuDma_PolledExample | ( | u16 | DeviceId | ) |
This function performs data transfer in loop back mode in polled mode and verify the data.
DeviceId | is the XPAR_<CSUDMA Instance>_DEVICE_ID value from xparameters.h. |
References XCsuDma_Config::BaseAddress, CSU_SSS_CONFIG_OFFSET, CSUDMA_LOOPBACK_CFG, XCsuDma_Config::DmaType, PMC_SSS_CONFIG_OFFSET, PMCDMA0_LOOPBACK_CFG, PMCDMA1_LOOPBACK_CFG, SIZE, XCsuDma_CfgInitialize(), XCSUDMA_DMATYPEIS_CSUDMA, XCSUDMA_DMATYPEIS_PMCDMA0, XCSUDMA_DST_CHANNEL, XCsuDma_IntrClear(), XCSUDMA_IXR_DONE_MASK, XCsuDma_LookupConfig(), XCsuDma_SelfTest(), XCSUDMA_SRC_CHANNEL, XCsuDma_Transfer(), and XCsuDma_WaitForDone.
XCsuDma CsuDma |
Instance of the Csu_Dma Device.