Configuring GPIO EDMA Events

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Introduction

Most TI devices with a 64x+ or 674x processor core use the same GPIO module.
Device Level Diagram of GPIO Hookup (DM355)
Diagram of GPIO Bank0 EDMA Events (DM355)

Devices with this module (as of May 22, 2009):

This article is intended to give detailed instructions on how to generate EDMA events when using this GPIO module. Note that this article is not intended as a tutorial for programming the EDMA. Following the steps in this article would result in an EDMA event being latched in the Event Register (ER/ERH) of the EDMA peripheral. The proper handling of that event would be covered by documentation relevant to EDMA.

Device Level Configuration

Pin muxing

Power, Reset, Clock

GPIO Configuration

  1. Configure the GPIO pin as an input by writing 0 to its respective bit in the DIRxy register.
  2. Enable a rising edge and/or falling edge EDMA event by writing to the appropriate bit in the SET_RIS_TRIGxy/SET_FAL_TRIGxy register.
  3. Enable the EDMA event by writing to BINTEN.ENn where n is the bank number. Note: This step must be performed regardless of whether you're planning to ultimately use a "direct" event (GPINTx) or the "bank" event (GPBNKINTy). The ENn bit gates all events from the GPIO module.

EDMA3 Configuration

You should consult your device-specific EDMA User's Guide for information on this peripheral at the hardware level. For programming examples you can refer to an article Programming the EDMA3 using the Low-Level Driver (LLD) or for a register-level programming example you can refer to Programming EDMA without EDMA3LLD package. The focus of this article is only generating the proper event to the EDMA, not configuration of the EDMA nor the EDMA interrupt itself.

Avoiding Double EDMA Events

On some devices bank 0 has the capability of generating EDMA events for some of the individual GPIO pins as well as a shared event for the whole bank (as in this diagram). For devices like DM355 that have both direct events and a shared bank event associated with bank 0 you should use either direct events only or the shared bank 0 event. Using both will cause two EDMA events to be generated from one edge on a GPIO pin! This topic describes that scenario in much more detail. Although the wording focuses on interrupts, the same is true of EDMA events since the exact same signals are tied to both the interrupt controller and the EDMA.

Generally this sort of thing is not an issue as the "bank event" is not commonly used for generating an EDMA transfer. Typically one would only ever use the "direct" events to generate an EDMA transfer. Put another way, generally you would not want initiate a transfer based on an edge occurring on any pin within a given bank. Instead you want the transfer to occur due to a specific pin toggling.

E2e.jpg For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Configuring GPIO EDMA Events here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox