AM263Px MCU+ SDK  10.01.00

Introduction

This module contains APIs to program and use DMA drivers available in the SoC with OSPI.

Data Structures

struct  OSPI_DmaFxns
 Driver implementation callbacks. More...
 
struct  OSPI_DmaConfig
 OSPI DMA Configuration, these are filled by SysCfg based on the DMA driver that is selected. More...
 

Functions

int32_t OSPI_dmaOpen (int32_t index)
 API to open an OSPI DMA channel. More...
 
int32_t OSPI_dmaClose (OSPI_DmaHandle handle)
 API to close an OSPI DMA channel. More...
 
int32_t OSPI_dmaCopy (OSPI_DmaHandle handle, void *dst, void *src, uint32_t length, uint32_t timeout)
 API to do a DMA Copy using appropriate DMA Channel opened. More...
 
int32_t OSPI_isDmaInterruptEnabled (OSPI_DmaHandle handle)
 API to get the DMA Interrupt status. More...
 

Typedefs

typedef void * OSPI_DmaHandle
 Handle to the OSPI DMA Config Object returned by OSPI_dmaOpen. More...
 
typedef int32_t(* OSPI_dmaOpenFxn) (void *ospiDmaArgs)
 Driver implementation to open a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* OSPI_dmaCloseFxn) (void *ospiDmaArgs)
 Driver implementation to close a specific DMA driver channel - UDMA, EDMA etc. More...
 
typedef int32_t(* OSPI_dmaCopyFxn) (void *ospiDmaArgs, void *dst, void *src, uint32_t length, uint32_t timeout)
 Driver implementation to do a DMA copy using a specific DMA driver - UDMA, EDMA etc. More...
 
typedef int32_t(* OSPI_dmaItrFxn) (void *ospiDmaArgs)
 Driver implementation to get the interrupt enable status for DMA driver channel. More...
 

Typedef Documentation

◆ OSPI_DmaHandle

typedef void* OSPI_DmaHandle

Handle to the OSPI DMA Config Object returned by OSPI_dmaOpen.

◆ OSPI_dmaOpenFxn

typedef int32_t(* OSPI_dmaOpenFxn) (void *ospiDmaArgs)

Driver implementation to open a specific DMA driver channel - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
ospiDmaArgs[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

◆ OSPI_dmaCloseFxn

typedef int32_t(* OSPI_dmaCloseFxn) (void *ospiDmaArgs)

Driver implementation to close a specific DMA driver channel - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
OSPI_DmaHandle[in] OSPI DMA Object handle returned from OSPI_dmaOpen
ospiDmaArgs[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

◆ OSPI_dmaCopyFxn

typedef int32_t(* OSPI_dmaCopyFxn) (void *ospiDmaArgs, void *dst, void *src, uint32_t length, uint32_t timeout)

Driver implementation to do a DMA copy using a specific DMA driver - UDMA, EDMA etc.

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
ospiDmaArgs[in] DMA specific arguments, obtained from the config
dst[in] Destination address to which the data is to be copied
src[in] Source address from which the data is to be copied
length[in] Data length
Returns
SystemP_SUCCESS on success, else failure

◆ OSPI_dmaItrFxn

typedef int32_t(* OSPI_dmaItrFxn) (void *ospiDmaArgs)

Driver implementation to get the interrupt enable status for DMA driver channel.

  • UDMA, EDMA etc

Typically this callback is hidden from the end application and is implemented when a new DMA driver needs to be supported.

Parameters
ospiDmaArgs[in] DMA specific arguments, obtained from the config
Returns
SystemP_SUCCESS on success, else failure

Function Documentation

◆ OSPI_dmaOpen()

int32_t OSPI_dmaOpen ( int32_t  index)

API to open an OSPI DMA channel.

This API will open a DMA Channel using the appropriate DMA driver callbacks and the registered via Sysconfig

Parameters
index[in] Index of the DMA Config selected for this particular OSPI driver instance
Returns
Handle to the OSPI DMA Config Object

◆ OSPI_dmaClose()

int32_t OSPI_dmaClose ( OSPI_DmaHandle  handle)

API to close an OSPI DMA channel.

This API will open a DMA Channel using the appropriate DMA driver callbacks registered via Sysconfig

Parameters
handle[in] Handle to the OSPI DMA Config Object returned from OSPI_dmaOpen
Returns
SystemP_SUCCESS on success, else failure

◆ OSPI_dmaCopy()

int32_t OSPI_dmaCopy ( OSPI_DmaHandle  handle,
void *  dst,
void *  src,
uint32_t  length,
uint32_t  timeout 
)

API to do a DMA Copy using appropriate DMA Channel opened.

This API will open a DMA Channel using the appropriate DMA driver callbacks registered via Sysconfig

Parameters
handle[in] Handle to the OSPI DMA Config Object returned from OSPI_dmaOpen
dst[in] Destination address to which the data is to be copied
src[in] Source address from which the data is to be copied
length[in] Data length
timeout[in] Timeout for the transaction
Returns
SystemP_SUCCESS on success, else failure

◆ OSPI_isDmaInterruptEnabled()

int32_t OSPI_isDmaInterruptEnabled ( OSPI_DmaHandle  handle)

API to get the DMA Interrupt status.

This API will retrieve the interrrupt status of the DMA Channel

Parameters
handle[in] Handle to the OSPI DMA Config Object
Returns
SystemP_SUCCESS on success, else failure