Texas Instruments EDMA3 User Manual
Texas Instruments EDMA3 User Manual

Texas Instruments EDMA3 User Manual

Resource manager
Hide thumbs Also See for EDMA3:

Advertisement

Quick Links

EDMA3 Resource Manager
U
s e
r ' s
G
u
i d
e
User Guide
May 2013
Document Version 02.11.07.XX

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EDMA3 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Texas Instruments EDMA3

  • Page 1 EDMA3 Resource Manager r ' s User Guide May 2013 Document Version 02.11.07.XX...
  • Page 2 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
  • Page 3: Read This First

    This User’s Manual serves as a software programmer’s handbook for working with the EDMA3 Resource Manager Version 02.11.07.XX. This manual provides necessary information regarding how to effectively install, build and use EDMA3 Resource Manager in user systems and applications. This manual provides details...
  • Page 4: Terms And Abbreviations

    Terms and Abbreviations Term/Abbreviation Description EDMA Enhanced Direct Memory Access EDMA3 Controller Consists of the EDMA3 channel controller (EDMA3CC) and EDMA3 transfer memory access controller(s) (EDMA3TC). Is referred to as EDMA3 in this document. Direct Memory Access QDMA Quick DMA...
  • Page 5: Notations

    The information in a caution or a warning is provided for your protection. Please read each caution and warning carefully. Related Documentation Internal  EDMA3 Channel Controller (TPCC), version 3.0.2 (Available at PDS)  EDMA3 Transfer Controller (TPTC), version 3.0.1 (Available at PDS)
  • Page 6: Trademarks

    Trademarks The TI logo design is a trademark of Texas Instruments Incorporated. All other brand and product names may be trademarks of their respective companies.
  • Page 7: Revision History

    Read This First Revision History Date Author Revision History Version October Anuj First release supporting platform DA830 02.00.00.XX 2008 Aggarwal on BIOS 6. June 3, 2009 Anuj Patch release for DA830 platform on 02.00.01.XX Aggarwal BIOS 6. December 7, Anuj a) Migration to new BSD license 02.10.00.XX 2009...
  • Page 8 Aug 10, Prasad Bug Fixes 02.11.06.01 2012 Konnur May 13, Prasad Addition of TDA2XX support 02.11.07.03 2013 Konnur May 17, Murtaza Addition of TCI6638K2K support 02.11.07.04 2013 Gaadiwala viii...
  • Page 9: Table Of Contents

    2.2.1 Development Tools ................. 1-2-4 Installation Guide................1-2-5 2.3.1 Installation and Usage Procedure ............1-2-5 2.3.2 Un-installation..................1-2-5 Integration Guide................1-2-6 2.4.1 Building EDMA3 Libraries ............... 1-2-6 2.4.2 Build Options.................... 1-2-8 Run-Time Interfaces/Integration Guide ............2-1 Symbolic Constants and Enumerated Data types ......2-2 Data Structures .................2-12 3.2.1 RM Global Error Callback.................
  • Page 10 4.2.1 edma3_<PLATFORM_NAME>_cfg.c:............3-34 4.2.2 Make file for the Resource Manager............3-35...
  • Page 11: Tables

    Table 1: Development Tools/components ...........1-2-4 Table 2: Build Options ..................1-2-8 Table 3: Symbolic Constants and Enumerated Data types Table for common header file edma3_common.h...........2-2 Table 4: Symbolic Constants and Enumerated Data types Table for EDMA3 Resource Manager Header file edma3_rm.h......2-4...
  • Page 13: Edma3 Resource Manager Introduction

    Chapter 1 EDMA3 Resource Manager Introduction This chapter introduces the EDMA3 Resource Manager to the user by providing a brief overview of the purpose and construction of the EDMA3 Resource Manager along with hardware and software environment specifics in the context of...
  • Page 14: Overview

    DMA and QDMA channels supported, number of PARAM sets available etc. The EDMA3 peripheral is used by other peripherals for their DMA needs thus the EDMA3 driver needs to cater to the requirements...
  • Page 15: Supported Services

    EDMA3 Resource Manager Introduction 1.1.2 Supported Services Following are the services provided by the Physical Resource Manager: 1.1.2.1 Allocation/de-allocation of EDMA3 resources: It provides interfaces that allow applications to allocate and free EDMA3 resources: EDMA channels  QDMA channels ...
  • Page 16 (DMA/QDMA channels, TCCs, PaRAM sets) available, number of Transfer controllers, queue priorities etc. 1.1.2.3 Binding of specific EDMA3 resources: It provides an interface that can be used by applications to bind specific EDMA3 resources like EDMA or QDMA channel with PaRAM Set entries.
  • Page 17 1.1.2.11 Registration and Un-registration of TCC callbacks: It provides an interface that can be called by applications to register/un-register for TCC callbacks. It handles EDMA3 interrupts and calls the respective TCC callback function with appropriate status. 1.1.2.12 Map Cross bar events to the DMA channels: It provides and interface than can be used to map the cross bar mapped events to the specific DMA channel.
  • Page 19: Installation Guide

    Chapter 2 Installation Guide This chapter discusses EDMA3 Resource Manager installation, how and what software and hardware components to be availed in order to complete a successful installation of EDMA3 Resource Manager.
  • Page 20: Component Folder

    Component Folder Upon installing the EDMA3 Resource Manager, the following directory structure is found in the main directory. Figure 1: EDMA3 Resource Manager Directory Structure The sections below describe the folder contents: edma3_lld_<<version_number>> Top level installation directory. Contains the source code, examples and the documents.
  • Page 21 Manager, along-with the pre-built libraries for the same. f) rm\src -> Source files for Resource Manager. Just to clarify, the sample folder inside the edma3/rm folder DOESN’T contain the sample applications. It provides the: a) Sample initialization code to properly configure the EDMA3 hardware,...
  • Page 22: Development Tools Environment(S)

    Development Tools Environment(s) This section describes the development tools environment(s) for software development with EDMA3 Resource Manager. It describes the tools used and their setup, for each supported environment. 2.2.1 Development Tools Describe here the tools that need to be installed, the installation...
  • Page 23: Installation Guide

    2.3.1 Installation and Usage Procedure 1) Install the products mentioned in the development tools requirements section, as per instructions provided along with the products. 2) Install the EDMA3 package by untarring the tar.gz file into preferred drive/folder. 3) After untarring,...
  • Page 24: Integration Guide

    Integration Guide This section describes the EDMA3 LLD package usage. The package provides pre-built libraries for all the different components: Resource Manager along with their sample initialization libraries etc. Moreover, demo applications are also provided to check the basic functionality for the supported components.
  • Page 25 “make” file, found in the component base folder itself, and re-build the libraries. By default, the parameter checking is enabled for all the public APIs. For e.g., following code snippet in the edma3\rm\make file is used to create the EDMA3 Resource Manager libraries: CFLAGS_LOCAL_COMMON = -mi10 By default, parameter checking is enabled in both Debug and Release modes for all the public APIs.
  • Page 26: Build Options

    Table 2: Build Options Note 1: All EDMA3 public APIs provide a mechanism to disable input parameter checking. This is intended to reduce the number of CPU cycles spent in the parameter checking and hence provide more efficient libraries. To do that, user has to modify the build environment (for e.g.
  • Page 27 Chapter 3 Run-Time Interfaces/Integration Guide This chapter discusses the EDMA3 Resource Manager run-time interfaces that comprise the API specification & usage scenarios, in association with its data types and structure definitions.
  • Page 28: Symbolic Constants And Enumerated Data Types

    EDMA3 Driver and Controller Resource Manager. EDMA3_MAX_PARAM_SETS Maximum PaRAM Sets supported by the EDMA3 Controller EDMA3_MAX_LOGICAL_CH Maximum Logical channels supported by the EDMA3 Package EDMA3_MAX_TCC Maximum TCCs (Interrupt Channels) supported EDMA3 Controller EDMA3_MAX_EVT_QUE Maximum Event Queues supported by the EDMA3 Controller...
  • Page 29 Defines for the level of OS protection EDMA3_OS_PROTECT_INTERRUPT_XFER_ Protection from EDMA3 Transfer needed when calling COMPLETION Completion Interrupt required edma3OsProtectXXX() EDMA3_OS_PROTECT_INTERRUPT_CC_E Protection from EDMA3 CC Error RROR Interrupt required EDMA3_OS_PROTECT_INTERRUPT_TC_E Protection from EDMA3 TC Error RROR Interrupt required...
  • Page 30 Table 4: Symbolic Constants and Enumerated Data types Table for EDMA3 Resource Manager Header file edma3_rm.h Group or Symbolic Constant Name Description or Evaluation Enumeration Class Enum EDMA3_RM_XFER_COMPLETE Transfer successfully EDMA3_RM_TccStat completed (true completion mode) or submitted to the TC (early completion mode).
  • Page 31 0 and less than the maximum allowed, then RM Object state should be ‘Opened’. If not, this error is returned. EDMA3_RM_E_MAX_RM_INST_OPENED There could be a maximum of EDMA3_RM_NUM_MAX_INSTANCE S instances per EDMA3 Controller. maximum number Instances are already Opened, this error is returned. EDMA3_RM_E_RM_MASTER_ALREADY_EX Master...
  • Page 32 EDMA3 registers like Event Queues Priority, Watermark threshold etc. More than ONE Master Resource Manager Instance supported. EDMA3_RM_E_CALLBACK_ALREADY_REG Callback function already ISTERED registered with the specified TCC. EDMA3_RM_E_FEATURE_UNSUPPORTED Hardware feature NOT supported EDMA3_RM_E_RES_NOT_ALLOCATED EDMA3 Resource NOT allocated EDMA3_RM_E_SEMAPHORE...
  • Page 33 Also, if any event associated with a particular peripheral gets changed, only that SoC specific file needs to changed. Enum EDMA3_RM_RES_DMA_CHANNEL EDMA3 Channel resource EDMA3_RM_ResTyp type. EDMA3_RM_RES_QDMA_CHANNEL EDMA3 QDMA Channel resource type.
  • Page 34 EDMA3_RM_RES_TCC EDMA3 TCC resource type. EDMA3_RM_RES_PARAM_SET EDMA3 PaRAM Set resource type. Enum EDMA3_RM_QDMA_TRIG_OPT Used to set the OPT field (Offset EDMA3_RM_QdmaT Address 0h Bytes) of the PaRAM rigWord Set as the QDMA trigger word. EDMA3_RM_QDMA_TRIG_SRC Used to set the Source Address...
  • Page 35 Address EDMA3_RM_TC0_PHY_ADDR Transfer Controller Physical Address Enum EDMA3_RM_IOCTL_MIN_IOCTL EDMA3 Resource Manager IOCTL EDMA3_RM_IoctlC commands. Min IOCTL. EDMA3_RM_IOCTL_SET_PARAM_CLEAR_ PaRAM Sets will be cleared OR will OPTION not be cleared during allocation, depending upon this option. For e.g., To clear the PaRAM Sets during allocation, cmdArg = (void *)1;...
  • Page 36 User should first change the behavior of resources' initialization and then should use start allocating resources. EDMA3_RM_IOCTL_GET_GBL_REG_MODI To check whether Global EDMA3 FY_OPTION registers (DCHMAP/QCHMAP) and PaRAM Sets will be programmed during allocation (EDMA3_RM_allocLogicalChannel ()).
  • Page 37 Run-Time Interfaces/Integration Guide EDMA3_RM_IOCTL_MAX_IOCTL Max IOCTL. I-11...
  • Page 38: Data Structures

    This configuration information is SoC specific and could be provided by the user at run-time while creating the EDMA3 Driver Object. In case user doesn’t provide it, this information could be taken from specific...
  • Page 39 Base address of EDMA3 TCs memory mapped registers. xferCompleteInt EDMA3 transfer completion interrupt line (could be different for ARM and DSP) ccError EDMA3 CC error interrupt line (could be different for ARM and DSP) tcError[EDMA3_MAX_TC] EDMA3 TCs error interrupt line (could be different for ARM and DSP)
  • Page 40: Edma3_Rm_Instanceinitconfig

    EDMA3_RM_open (). Owned resources: EDMA3 Driver Instances are tied to different shadow regions and hence different masters. Regions could be: a) ARM, b) DSP,...
  • Page 41 Run-Time Interfaces/Integration Guide User can assign each EDMA3 resource to a shadow region using this structure. In this way, user specifies which resources are owned by the specific EDMA3 Driver Instance. This assignment should also ensure that the same resource is not assigned to more than one shadow regions (unless desired in that way).
  • Page 42 [EDMA3_MAX_QDMA_CHAN_DWRDS] Instance. ownTccs [EDMA3_MAX_TCC_DWRDS] TCCs owned by the EDMA3 Driver Instance. resvdPaRAMSets PaRAM Sets reserved during initialization for [EDMA3_MAX_PARAM_DWRDS] future use. These will not be given when user requests for ANY available PaRAM Set using 'EDMA3_RM_LINK_CHANNEL' resource/channel id. resvdDmaChannels DMA channels reserved during initialization for [EDMA3_MAX_DMA_CHAN_DWRDS] future use.
  • Page 43: Edma3_Rm_Param

    Instance, region id, global error callback parameters, instance specific semaphore handle, whether this instance is master or not etc. Only the master instance will receive the interrupts from the EDMA3 controller, if interrupts are enabled. 3.2.6 EDMA3_RM_MiscParam This configuration structure is used to specify some miscellaneous options while creating the Resource Manager object.
  • Page 44: Edma3_Rm_Resdesc

    3.2.8 EDMA3_RM_ResDesc This structure is used to specify an EDMA3 resource object i.e. the resource type (DMA / QDMA / PaRAM Set / TCC) and the resource handle this object used while allocating/freeing the resources.
  • Page 45 Run-Time Interfaces/Integration Guide I-19...
  • Page 47: Api Specification

    Run-Time Interfaces/Integration Guide API Specification The application programming interface (API) for the EDMA3 Resource Manager can be found at: EDMA3_Resource_Manager.chm I-21...
  • Page 48: Api Usage Example

    API Usage Example Below is a flow-chart describing the steps required to create the Resource Manager Object and then initialize a region specific Resource Manager Instance. After the successful opening, the RM instance can be used to call other RM APIs.
  • Page 49 Run-Time Interfaces/Integration Guide / * Cr e a t e th e Re s o u r c e M a n a g e r O b j e ct f o r th e sp e c i f i c E DM A 3 H a r d wa r e i n s ta n c e p h y Ct r l l e r I n st I d * / r e s u l t = E D MA 3 _ R M_ c r e a t e ( p h y Ct r l l e r I n st I d , g l o b a l C fg P a r a m s, N UL L ) ;...
  • Page 50 Below is the sample configuration of the Resource Manager Object, tied to a specific EDMA3 hardware. This configuration information is EDMA3 controller specific and needs to be passed while calling the API EDMA3_RM_create (). Also, sample configuration for Resource Manager Instance is also provided...
  • Page 51 /* Driver Object Initialization Configuration */ Run-Time Interfaces/Integration Guide EDMA3_RM_GblConfigParams globalCfgParams = /** Total number of DMA Channels supported by the EDMA3 Controller */ 32u, /** Total number of QDMA Channels supported by the EDMA3 Controller */ /** Total number of TCCs supported by the EDMA3 Controller */...
  • Page 52 * \brief EDMA3 TC priority setting * User can program the priority of the Event Queues * at a system-wide level. This means that the user can set the * priority of an IO initiated by either of the TCs (Transfer Controllers)
  • Page 53 /* DMA channels 32-63 DOES NOT exist in DA830. */ EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, Run-Time Interfaces/Integration Guide EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS, EDMA3_MAX_PARAM_SETS * \brief Mapping from each DMA channel to a TCC.
  • Page 54 /* Driver Instance Initialization Configuration */ EDMA3_RM_InstanceInitConfig sampleInstInitConfig = /* Resources owned by Region 1 */ /* ownPaRAMSets */ /* 31 96 */ {0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu, /* 159 224 */ 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, /* 287 352 */ 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u, /* 415 480 */ 0x00000000u, 0x00000000u, 0x00000000u, 0x00000000u,},...
  • Page 55 Run-Time Interfaces/Integration Guide EDMA3_DRV_GblXbarToChanConfigParams sampleXbarChanInitConfig= /* Event to channel map for region 0 */ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 /* End of File */ I-29...
  • Page 56 Below is the sample configuration of the Resource Manager instance, operating on shadow region 1 as a slave. So this Resource Manager instance will not receive any interrupts from the EDMA3 controller. To receive the interrupts on a specific region (or Master), one has to open the Resource Manager instance as Master (only ONCE), i.e.
  • Page 57: Edma3 Resource Manager Porting

    EDMA3 Resource Manager Porting Chapter 4 EDMA3 Resource Manager Porting This chapter discusses how to port EDMA3 Resource Manager to other supported target platforms. I-31...
  • Page 58: Getting Started

    This is done in order to make the it OS independent. The following OS dependent part of the EDMA3 Package has to be provided by the user: a) Critical section entry and exit functions: They should be implemented by the application for proper linking with the EDMA3 RM.
  • Page 59 Semaphore related functions: They should be implemented by the application for proper linking with Resource Manager. The EDMA3 Resource Manager uses these functions for proper sharing of resources (among various users) and assumes the implementation of these functions to be provided by the application.
  • Page 60: Step-By-Step Procedure For Porting

    Step-by-Step procedure for porting This section provides illustrative description on how to port the EDMA3 Resource Manager to the selected platform and the OS. 4.2.1 edma3_<PLATFORM_NAME>_cfg.c: EDMA3_RM_GblConfigParams is the initialization structure which is used to specify the EDMA3 Hardware specific global settings, specific to the SoC.
  • Page 61 EDMA3 Resource Manager Porting 4.2.2 Make file for the Resource Manager Platform specific EDMA3 configuration file will be included as a source file in the make file. The make file has many variables which will be used to generate the platform specific Resource Manager libraries.

Table of Contents