![]() |
![]() |
DMAWFF3 driver implementation.
============================================================================
The DMAWFF3 header file should be included in an application as follows:
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.
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 is handled by the overlying driver which uses the DMA.
Power management is handled by the overlying driver which uses the DMA.
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. |
#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)>

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... | |
| enum DMAWFF3_ChConfig |
Definitions for the config argument of the DMAWFF3_configureChannel() function. The argument value must be a bitwise OR the supported defines.
| enum 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 |
| enum 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 |
| enum DMAWFF3_Peripheral |
Definitions for the peripheral argument of the DMAWFF3_connectChannel() function.
| 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.
| 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.
| 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.
| 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.
| __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.
| channel | Channel number to be configured. |
| blockSize | Number of words in a block (1-63 words, inclusive). |
| wordSize | Size of a word which is one of the following defines: |
| config | Channel configuration which is a bitwise OR of the following defines: |
| __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.
The function will start a transaction on the given DMA channel
| channel | Channel number of the DMA transaction |
| srcStartAddr | Pointer to the start address of the source data. The pointer cannot point to flash memory. |
| dstStartAddr | Pointer to the destination start address |
| transLenByte | Number of bytes in the DMA transaction |
| remainingBytesBurst | True if burst mode shall be used |