Enumerations | Functions
DMAWFF3.h File Reference

Detailed Description

DMAWFF3 driver implementation.

============================================================================

Driver include

The DMAWFF3 header file should be included in an application as follows:

Overview

The DMAWFF3 driver currently only supports internal use by the drivers that use the DMA peripheral (for example, UART2WFF3). In other words, the application should never call any of the functions in this file.

General Behavior

This driver is used implicitly by other drivers (e.g., the UART2WFF3 driver) so users should not have to interface to this driver from the application.

Error handling

Error handling is handled by the overlying driver which uses the DMA.

Power management

Power management is handled by the overlying driver which uses the DMA.

Supported functions

Note that these functions should never be called from the application, they are only called from other drivers. They are however included here for completeness:

API function Description
DMAWFF3_clearInterrupt() Clear DMA interrupts.
DMAWFF3_configureChannel() Configure DMA channel transaction.
DMAWFF3_connectChannel() Connect DMA channel to peripheral.
DMAWFF3_disableChannel() Abort DMA channel operation.
DMAWFF3_getRemainingBytes() Get remaining bytes of DMA transaction.
DMAWFF3_init() Initialize the DMA driver.
DMAWFF3_initChannel() Initialize DMA channel HW functionality.
DMAWFF3_startTransaction() Start DMA channel transaction.
Note
These functions should not be called by code. These functions are called by drivers using the DMA.

Unsupported Functionality

#include <stdint.h>
#include <stdbool.h>
#include <ti/drivers/Power.h>
#include <ti/devices/DeviceFamily.h>
#include <DeviceFamily_constructPath(inc/hw_types.h)>
#include <DeviceFamily_constructPath(driverlib/dma.h)>
Include dependency graph for DMAWFF3.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  DMAWFF3_ChConfig {
  DMAWFF3_CONFIG_SRC_PTR_WRAP = DMA_CONFIG_SRC_PTR_WRAP, DMAWFF3_CONFIG_DST_PTR_WRAP = DMA_CONFIG_DST_PTR_WRAP, DMAWFF3_CONFIG_FORCE_REQ = DMA_CONFIG_FORCE_REQ, DMAWFF3_CONFIG_SRC_PTR_FIFO = DMA_CONFIG_SRC_PTR_FIFO,
  DMAWFF3_CONFIG_DST_PTR_FIFO = DMA_CONFIG_DST_PTR_FIFO, DMAWFF3_CONFIG_RX = DMA_CONFIG_RX, DMAWFF3_CONFIG_TX = DMA_CONFIG_TX, DMAWFF3_CONFIG_CLEAR_AT_JOB_START = DMA_CONFIG_CLEAR_AT_JOB_START
}
 Definitions for the config argument of the DMAWFF3_configureChannel() function. The argument value must be a bitwise OR the supported defines. More...
 
enum  DMAWFF3_WordSize { DMAWFF3_WORD_SIZE_1B = DMA_WORD_SIZE_1B, DMAWFF3_WORD_SIZE_2B = DMA_WORD_SIZE_2B, DMAWFF3_WORD_SIZE_4B = DMA_WORD_SIZE_4B }
 Definitions for the wordSize argument of the DMAWFF3_configureChannel() function. More...
 
enum  DMAWFF3_BlockSize { DMAWFF3_BLOCK_SIZE_1B = DMA_WORD_SIZE_1B, DMAWFF3_BLOCK_SIZE_2B = DMA_WORD_SIZE_2B, DMAWFF3_BLOCK_SIZE_4B = DMA_WORD_SIZE_4B }
 Definitions for the blockSize argument of the DMAWFF3_configureChannel() function. More...
 
enum  DMAWFF3_Peripheral {
  DMAWFF3_PERIPH_UARTLIN_0 = DMA_PERIPH_UARTLIN_0, DMAWFF3_PERIPH_UARTLIN_1 = DMA_PERIPH_UARTLIN_1, DMAWFF3_PERIPH_SPI_0 = DMA_PERIPH_SPI_0, DMAWFF3_PERIPH_SPI_1 = DMA_PERIPH_SPI_1,
  DMAWFF3_PERIPH_I2C_0 = DMA_PERIPH_I2C_0, DMAWFF3_PERIPH_I2C_1 = DMA_PERIPH_I2C_1, DMAWFF3_PERIPH_SDMMC = DMA_PERIPH_SDMMC, DMAWFF3_PERIPH_SDIO = DMA_PERIPH_SDIO,
  DMAWFF3_PERIPH_MCAN = DMA_PERIPH_MCAN, DMAWFF3_PERIPH_ADC = DMA_PERIPH_ADC, DMAWFF3_PERIPH_PDM = DMA_PERIPH_PDM, DMAWFF3_PERIPH_HIF = DMA_PERIPH_HIF,
  DMAWFF3_PERIPH_UARTLIN_2 = DMA_PERIPH_UARTLIN_2
}
 Definitions for the peripheral argument of the DMAWFF3_connectChannel() function. More...
 

Functions

void DMAWFF3_disableChannel (uint32_t channel)
 Function to disable a DMA channel. More...
 
uint16_t DMAWFF3_getRemainingBytes (uint32_t channel)
 Function to get the number of remaining bytes of a DMA transaction. More...
 
void DMAWFF3_init (void)
 Function to initialize the WFF3 DMA driver and peripheral. More...
 
void DMAWFF3_initChannel (uint32_t channel)
 Function to initialize a DMA channel. More...
 
__STATIC_INLINE void DMAWFF3_configureChannel (uint32_t channel, uint8_t blockSize, DMAWFF3_WordSize wordSize, DMAWFF3_ChConfig config)
 Function to configure the given DMA channel. More...
 
__STATIC_INLINE void DMAWFF3_connectChannel (uint32_t channel, DMAWFF3_Peripheral peripheral)
 
__STATIC_INLINE void DMAWFF3_clearInterrupt (uint32_t channelBitmask)
 
__STATIC_INLINE void DMAWFF3_startTransaction (uint32_t channel, const uint32_t *srcStartAddr, uint32_t *dstStartAddr, uint16_t transLenByte, bool remainingBytesBurst)
 Function to start a DMA transaction. More...
 

Enumeration Type Documentation

§ DMAWFF3_ChConfig

Definitions for the config argument of the DMAWFF3_configureChannel() function. The argument value must be a bitwise OR the supported defines.

Enumerator
DMAWFF3_CONFIG_SRC_PTR_WRAP 

Source pointer wraps around

DMAWFF3_CONFIG_DST_PTR_WRAP 

Destination pointer wraps around

DMAWFF3_CONFIG_FORCE_REQ 

Tie DMA request signal high. Set this bit when doing memory-to-memory transactions.

DMAWFF3_CONFIG_SRC_PTR_FIFO 

Source pointer (FIFO mode)

DMAWFF3_CONFIG_DST_PTR_FIFO 

Destination pointer (FIFO mode)

DMAWFF3_CONFIG_RX 

Link DMA channel to RX port of peripheral

DMAWFF3_CONFIG_TX 

Link DMA channel to TX port of peripheral

DMAWFF3_CONFIG_CLEAR_AT_JOB_START 

Enable DMA to set a read/write clear pulse at the beginning of a job (one cycle after run cmd)

§ DMAWFF3_WordSize

Definitions for the wordSize argument of the DMAWFF3_configureChannel() function.

Enumerator
DMAWFF3_WORD_SIZE_1B 

Word size is 1 byte

DMAWFF3_WORD_SIZE_2B 

Word size is 2 bytes

DMAWFF3_WORD_SIZE_4B 

Word size is 4 bytes

§ DMAWFF3_BlockSize

Definitions for the blockSize argument of the DMAWFF3_configureChannel() function.

Enumerator
DMAWFF3_BLOCK_SIZE_1B 

Block size is 1 byte

DMAWFF3_BLOCK_SIZE_2B 

Block size is 2 bytes

DMAWFF3_BLOCK_SIZE_4B 

Block size is 4 bytes

§ DMAWFF3_Peripheral

Definitions for the peripheral argument of the DMAWFF3_connectChannel() function.

Enumerator
DMAWFF3_PERIPH_UARTLIN_0 
DMAWFF3_PERIPH_UARTLIN_1 
DMAWFF3_PERIPH_SPI_0 
DMAWFF3_PERIPH_SPI_1 
DMAWFF3_PERIPH_I2C_0 
DMAWFF3_PERIPH_I2C_1 
DMAWFF3_PERIPH_SDMMC 
DMAWFF3_PERIPH_SDIO 
DMAWFF3_PERIPH_MCAN 
DMAWFF3_PERIPH_ADC 
DMAWFF3_PERIPH_PDM 
DMAWFF3_PERIPH_HIF 
DMAWFF3_PERIPH_UARTLIN_2 

Function Documentation

§ DMAWFF3_disableChannel()

void DMAWFF3_disableChannel ( uint32_t  channel)

Function to disable a DMA channel.

The function will abort any operation in the selected DMA channel. Function returns when abort operation is finished. The abort operation might last for a maximum of eight clock cycles.

Precondition
Calling context: Hwi, Swi, Task
Postcondition
DMAWFF3_initChannel() must be called before any new transaction can be started on the channel.

§ DMAWFF3_getRemainingBytes()

uint16_t DMAWFF3_getRemainingBytes ( uint32_t  channel)

Function to get the number of remaining bytes of a DMA transaction.

The function will return the number of remaining of bytes of a DMA transaction. An aborted DMA transaction may cause bytes to remain.

Precondition
Calling context: Hwi, Swi, Task
Returns
Number of remaining bytes in last DMA transaction

§ DMAWFF3_init()

void DMAWFF3_init ( void  )

Function to initialize the WFF3 DMA driver and peripheral.

The function will initialize the DMA peripheral by disabling all DMA interrupts.

Precondition
Calling context: Hwi, Swi, Task

§ DMAWFF3_initChannel()

void DMAWFF3_initChannel ( uint32_t  channel)

Function to initialize a DMA channel.

The function will initialize the selected DMA channel by issuing an INIT command to the channel.

Precondition
Calling context: Hwi, Swi, Task

§ DMAWFF3_configureChannel()

__STATIC_INLINE void DMAWFF3_configureChannel ( uint32_t  channel,
uint8_t  blockSize,
DMAWFF3_WordSize  wordSize,
DMAWFF3_ChConfig  config 
)

Function to configure the given DMA channel.

The function will configure the given DMA channel. The block size of the channel determines the arbitration rate of the DMA channels.

Precondition
Calling context: Hwi, Swi, Task
Parameters
channelChannel number to be configured.
blockSizeNumber of words in a block (1-63 words, inclusive).
wordSizeSize of a word which is one of the following defines:
configChannel configuration which is a bitwise OR of the following defines:

§ DMAWFF3_connectChannel()

__STATIC_INLINE void DMAWFF3_connectChannel ( uint32_t  channel,
DMAWFF3_Peripheral  peripheral 
)

§ DMAWFF3_clearInterrupt()

__STATIC_INLINE void DMAWFF3_clearInterrupt ( uint32_t  channelBitmask)

§ DMAWFF3_startTransaction()

__STATIC_INLINE void DMAWFF3_startTransaction ( uint32_t  channel,
const uint32_t *  srcStartAddr,
uint32_t *  dstStartAddr,
uint16_t  transLenByte,
bool  remainingBytesBurst 
)

Function to start a DMA transaction.

The function will start a transaction on the given DMA channel

Precondition
Calling context: Hwi, Swi, Task
Parameters
channelChannel number of the DMA transaction
srcStartAddrPointer to the start address of the source data. The pointer cannot point to flash memory.
dstStartAddrPointer to the destination start address
transLenByteNumber of bytes in the DMA transaction
remainingBytesBurstTrue if burst mode shall be used
© Copyright 1995-2026, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale