4.15. UDMA

4.15.1. Introduction

The DMA architecture specifies the data structures used by standard communications modules to facilitate direct memory access (DMA) and to provide a consistent application programming interface (API) to the host software in multi-core devices. The data structures and the API used to manipulate them will be jointly referred to as NAVSS. For more information on NAVSS DMA architecture, refer to the device Technical Reference Manual

The UDMA driver provides API to program the DMA portion of the NAVSS subsystem to setup and initiate transfers. Below are the high level features supported by the driver

  • Both Main and MCU NAVSS instances
  • Supports all DMA operations from both instances from all the cores in the SOC
  • UDMAP block copy using native NAVSS channels
  • DRU block copy using direct TR submission to DRU register
  • DRU block copy using indirect (PSIL) TR submission to UDMA external channels
  • PDMA module to initiate transfers to/from PDMA peripherals like UART, McASP, McSPI, ADC, MCAN
  • DMA transfer to/from from native PSIL peripherals like EMAC, CPSW, SA2UL
  • Event and interrupt management like DMA completion, channel chaining, interrupt sharing using IA
  • Resources management across instances and cores for UDMAP DMA channels,RX flow, External UTC channel (DRU), interrupt aggregators (IA), interrupt routers (IR),global events, ring accelerators (RA)
  • Interaction with DMSC RM module via SCICLIENT for all non-RealTime (NRT) configuration
  • Supports both TI-RTOS and baremetal

Notes

  • UDMA driver doesn’t manage/allocate the descriptor and RA memory.The caller need to allocate and provide the required memory.
  • UDMA driver doesn’t use any global variables. All the required object memory like channel, driver instance, event etc should be allocated by the caller

This document has detailed API description that user can use to make use of the UDMA driver.

4.15.2. User Interface

For details about individual fields of this library structure, see the PDK doxygen documentation

4.15.2.1. APIs

The UDMA driver API can be broadly divided into the following categories

  • UDMAP native channel API
  • DRU (External UTC) channel API
  • PDMA channel operations
  • Event and interrupt API
  • Ring API

In addition to above drivers the UDMA package also includes many sample examples which show how to use the drivers in different ways. Many of these sample examples use a common set of APIs which a user may find useful to refer to for use in their final application.

API reference for application:

#include <ti/drv/udma/udma.h>

4.15.3. Application

4.15.3.1. Examples

Name
Description
Expected Results
UDMA ADC RX application
This performs PDMA RX data capture from ADC. ADC is configured in single shot mode and captures APP_ADC_NUM_CH channel of ADC data. The FIFO is configured to generate a DMA trigger after all channel data is captured
The application checks the ADC channel ID and prints pass on successful completion
UDMA Chaining application
UDMA chaining sample application performing a chain of block copy using channel global trigger: CH0 -> CH1 -> ... -> CHx. The first channel doesn’t user a global trigger and each channel triggers the next channel’s global trigger through the channel’s TR event register. A channel’s source buffer is previous channel destination buffer. This ensures that chaining trigger worked in a synchronized manner when the memory compare matches
The application checks the destination buffer with source buffer and prints pass on successful completion
UDMA CRC application
This performs UDMA CRC operation
The application checks the calculated CRC value with pre-calculated CRC value and prints pass on successful completion
UDMA Direct TR DRU application
UDMA DRU memcpy sample application performing block copy using direct TR submission via DRU registers
The application checks the destination buffer with source buffer and prints pass on successful completion
UDMA In-Direct TR DRU application
UDMA DRU memory copy sample application performing block copy using Type 15 Transfer Record (TR15) using Transfer Record Packet Descriptor (TRPD) for developers.
The application checks the destination buffer with source buffer and prints pass on successful completion
UDMA Blockcopy application
UDMA memory copy sample application performing block copy using Type 15 Transfer Record (TR15) using Transfer Record Packet Descriptor (TRPD)
The application checks the destination buffer with source buffer and prints pass on successful completion