AM275 FreeRTOS SDK  11.01.00

Introduction

This is AASRC dma related APIs, parameters and local functions

Files

file  aasrc_dma.h
 AASRC dma related parameters and APIs.
 

Data Structures

struct  AASRC_DmaChCfg
 Data structure used to store DMA channel configuration. More...
 
struct  AASRC_DmaIcnt
 

Functions

int32_t AASRC_dmaChOpen (AASRC_ChHandle chHandle)
 Function opens an UDMA channel for AASRC channel RX/TX. More...
 
int32_t AASRC_dmaChEnable (AASRC_ChHandle chHandle)
 Function enables the UDMA channel for AASRC channel RX/TX. More...
 
int32_t AASRC_dmaChDisable (AASRC_ChHandle chHandle)
 Function disables the UDMA channel for AASRC channel RX/TX. More...
 
int32_t AASRC_dmaChClose (AASRC_ChHandle chHandle)
 Function closes the UDMA channel for AASRC channel RX/TX. More...
 
int32_t AASRC_disableDmaRx (AASRC_ChHandle chHandle)
 Function disables the UDMA channel for AASRC channel Tx. More...
 
int32_t AASRC_disableDmaTx (AASRC_ChHandle chHandle)
 Function disables the UDMA channel for AASRC channel Rx. More...
 

Macros

#define AASRC_TX_DMA_RING_ELEM_CNT   (1U)
 
#define AASRC_TX_DMA_TR_COUNT   (64U)
 
#define AASRC_RX_DMA_RING_ELEM_CNT   (1U)
 
#define AASRC_RX_DMA_TR_COUNT   (64U)
 
#define AASRC_DMA_L0_MAX_XFER_SIZE   (65535U)
 
#define AASRC_DMA_UDMA_XFER_SIZE   (64512U)
 
#define AASRC_DMA_TX_CH_FIFO_DEPTH   (128U)
 
#define AASRC_DMA_RX_CH_FIFO_DEPTH   (128U)
 
#define AASRC_UDMA_TRPD_MEM_SIZE_TX   (UDMA_GET_TRPD_TR3_SIZE(AASRC_TX_DMA_TR_COUNT))
 
#define AASRC_UDMA_TRPD_MEM_SIZE_RX   (UDMA_GET_TRPD_TR3_SIZE(AASRC_RX_DMA_TR_COUNT))
 
#define AASRC_UDMA_RING_ENTRY_SIZE   (sizeof(uint64_t))
 
#define AASRC_UDMA_RING_MEM_SIZE_TX   (AASRC_TX_DMA_RING_ELEM_CNT * AASRC_UDMA_RING_ENTRY_SIZE)
 
#define AASRC_UDMA_RING_MEM_SIZE_RX   (AASRC_RX_DMA_RING_ELEM_CNT * AASRC_UDMA_RING_ENTRY_SIZE)
 
#define AASRC_DMA_PERPETUAL_RELOAD_CNT   (0x1FFU)
 
#define WORD_BYTE_COUNT   (4U)
 
#define AASRC_INVALID_TXN_IDX   (0xDEADBEEFU)
 
#define AASRC_ICNT2_MAX   (65535U)
 

Macro Definition Documentation

◆ AASRC_TX_DMA_RING_ELEM_CNT

#define AASRC_TX_DMA_RING_ELEM_CNT   (1U)

◆ AASRC_TX_DMA_TR_COUNT

#define AASRC_TX_DMA_TR_COUNT   (64U)

◆ AASRC_RX_DMA_RING_ELEM_CNT

#define AASRC_RX_DMA_RING_ELEM_CNT   (1U)

◆ AASRC_RX_DMA_TR_COUNT

#define AASRC_RX_DMA_TR_COUNT   (64U)

◆ AASRC_DMA_L0_MAX_XFER_SIZE

#define AASRC_DMA_L0_MAX_XFER_SIZE   (65535U)

◆ AASRC_DMA_UDMA_XFER_SIZE

#define AASRC_DMA_UDMA_XFER_SIZE   (64512U)

◆ AASRC_DMA_TX_CH_FIFO_DEPTH

#define AASRC_DMA_TX_CH_FIFO_DEPTH   (128U)

◆ AASRC_DMA_RX_CH_FIFO_DEPTH

#define AASRC_DMA_RX_CH_FIFO_DEPTH   (128U)

◆ AASRC_UDMA_TRPD_MEM_SIZE_TX

#define AASRC_UDMA_TRPD_MEM_SIZE_TX   (UDMA_GET_TRPD_TR3_SIZE(AASRC_TX_DMA_TR_COUNT))

◆ AASRC_UDMA_TRPD_MEM_SIZE_RX

#define AASRC_UDMA_TRPD_MEM_SIZE_RX   (UDMA_GET_TRPD_TR3_SIZE(AASRC_RX_DMA_TR_COUNT))

◆ AASRC_UDMA_RING_ENTRY_SIZE

#define AASRC_UDMA_RING_ENTRY_SIZE   (sizeof(uint64_t))

◆ AASRC_UDMA_RING_MEM_SIZE_TX

#define AASRC_UDMA_RING_MEM_SIZE_TX   (AASRC_TX_DMA_RING_ELEM_CNT * AASRC_UDMA_RING_ENTRY_SIZE)

◆ AASRC_UDMA_RING_MEM_SIZE_RX

#define AASRC_UDMA_RING_MEM_SIZE_RX   (AASRC_RX_DMA_RING_ELEM_CNT * AASRC_UDMA_RING_ENTRY_SIZE)

◆ AASRC_DMA_PERPETUAL_RELOAD_CNT

#define AASRC_DMA_PERPETUAL_RELOAD_CNT   (0x1FFU)

◆ WORD_BYTE_COUNT

#define WORD_BYTE_COUNT   (4U)

◆ AASRC_INVALID_TXN_IDX

#define AASRC_INVALID_TXN_IDX   (0xDEADBEEFU)

◆ AASRC_ICNT2_MAX

#define AASRC_ICNT2_MAX   (65535U)

Function Documentation

◆ AASRC_dmaChOpen()

int32_t AASRC_dmaChOpen ( AASRC_ChHandle  chHandle)

Function opens an UDMA channel for AASRC channel RX/TX.

Connects AASRC RX with UDMA TX and AASRC TX with UDMA RX

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes

◆ AASRC_dmaChEnable()

int32_t AASRC_dmaChEnable ( AASRC_ChHandle  chHandle)

Function enables the UDMA channel for AASRC channel RX/TX.

Enables the dma and create TRPDs

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes

◆ AASRC_dmaChDisable()

int32_t AASRC_dmaChDisable ( AASRC_ChHandle  chHandle)

Function disables the UDMA channel for AASRC channel RX/TX.

Disables the dma. This will in turn clear out all the BCDMA/PDMA FIFOs, clearout all the TRPDs from the ring (teardown the channel)

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes

◆ AASRC_dmaChClose()

int32_t AASRC_dmaChClose ( AASRC_ChHandle  chHandle)

Function closes the UDMA channel for AASRC channel RX/TX.

Flushes pending TRPDs from the queue and closes the DMA channel

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes

◆ AASRC_disableDmaRx()

int32_t AASRC_disableDmaRx ( AASRC_ChHandle  chHandle)

Function disables the UDMA channel for AASRC channel Tx.

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes

◆ AASRC_disableDmaTx()

int32_t AASRC_disableDmaTx ( AASRC_ChHandle  chHandle)

Function disables the UDMA channel for AASRC channel Rx.

Parameters
chHandle[IN] channel handle to identify AASRC channel (returned from AASRC_chOpen())
Returns
AASRC_ErrorCodes