NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Configuring GPIO EDMA Events

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

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):

  • DM355
  • DM644x
  • DM646x
  • C642x
  • DM643x
  • C674x
  • OMAP-L13x

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[edit]

Pin muxing

  • Make sure that pins you want configured as GPIO are configured in the device-wide pin-muxing registers to be GPIO function and not some other peripheral function.
  • For example, in C6424 this would be done in the registers PINMUX0 and PINMUX1 as described in the C6424 datasheet.

Power, Reset, Clock

  • These devices have a module called the Power and Sleep Controller (PSC) that controls power, reset, and clock to all the peripherals. Make sure the peripheral is powered and in an "enabled" state, i.e. peripheral clock enabled and peripheral out of reset.
  • Generally the gel file corresponding to a given device will turn on all peripheral domains when you connect to the device with the emulator. When transitioning from development to production this duty would shift from the gel file to the bootloader.

GPIO Configuration[edit]

  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[edit]

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[edit]

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 {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Configuring GPIO EDMA Events here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Configuring GPIO EDMA Events here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Configuring GPIO EDMA Events here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Configuring GPIO EDMA Events here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Configuring GPIO EDMA Events here. OMAP35x=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. OMAPL1=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. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Configuring GPIO EDMA Events here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Configuring GPIO EDMA Events here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity