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.

StarterWare GPIO V2

From Texas Instruments Wiki
Jump to: navigation, search

GPIO[edit]

Introduction[edit]

Each GPIO module provides 32 dedicated general-purpose pins with input and output capabilities. These pins can be configured for the following applications:

  • Data input (capture)/output (drive)
  • Keyboard interface with a debounce cell
  • Interrupt generation in active mode upon the detection of external events. Detected events are processed by two parallel independent interrupt-generation submodules to support biprocessor operations.

Programming[edit]

  • Firstly, enable the functional clocks for the required GPIO instance.
  • Perform a pin multiplexing for the required GPIO pin by calling the appropriate pin multiplexing function implemented in the respective Platform file.
  • Enable the GPIO module using the API GPIOModuleEnable(). Doing this would confirm that the clocks to the GPIO module are not gated.
  • Perform a module reset of the GPIO module using the API GPIOModuleReset(). This API also waits until the module reset is complete.
  • A GPIO pin can be used either as an input or an output pin. This direction of the GPIO pin is configured using the API GPIODirModeSet().
  • When a GPIO pin is configured as an input pin, the following configurations become relevant:
    • Enable debouncing feature for the specified input GPIO pin if required, using the API GPIODebounceFuncControl().
    • Program the debouncing time, if required using the API GPIODebounceTimeConfig().
    • Interrupt trigger conditions need to be configured using the API GPIOIntTypeSet() using appropriate parameters.
    • Enable GPIO to generate interrupts on detection of the specified transitions on the decided GPIO pin using the API GPIOPinIntEnable()
  • When a GPIO pin is configured as an output pin, the following configurations become relevant:
    • A logic HIGH or a logic LOW could be driven on the specified GPIO pin by invoking the API GPIOPinWrite() passing appropriate parameters.

Note: If GPIO peripheral interrupts will be used, then the system interrupt settings needs to be performed prior to enabling the GPIO peripheral interrupts. System interrupt settings involves configuring the ARM processor and the Interrupt Controller(INTC) to handle peripheral interrupts.

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 StarterWare GPIO V2 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 StarterWare GPIO V2 here.

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