Architecture
929
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
General-Purpose Input/Output (GPIO)
20.2.8.2 Hardware Reset Considerations
A hardware reset does reset the GPIO configuration and data registers to their default states; therefore,
affecting the configuration and state of the GPIO signals.
20.2.9 Initialization
The following steps are required to configure the GPIO module after a hardware reset:
1. Perform the necessary device pin multiplexing setup (see your device-specific data manual).
2. Program the Power and Sleep Controller (PSC) to enable the GPIO module. For details on the PSC,
see the
Power and Sleep Controller (PSC)
chapter.
3. Program the direction, data, and interrupt control registers to set the configuration of the desired GPIO
pins (described in this chapter).
The GPIO module is now ready to perform data transactions.
20.2.10 Interrupt Support
The GPIO peripheral can send an interrupt event to the CPU.
20.2.10.1 Interrupt Events and Requests
All GPIO signals can be configured to generate interrupts. The device supports interrupts from single
GPIO signals, interrupts from banks of GPIO signals, or both.
Note that the GPIO interrupts may also be used to provide synchronization events to the DMA controller.
20.2.10.2 Enabling GPIO Interrupt Events
GPIO interrupt events are enabled in banks of 16 by setting the appropriate bit(s) in the GPIO interrupt
per-bank enable register (BINTEN). For example, to enable bank 0 interrupts (events from GP0[15-0]), set
bit 0 in BINTEN; to enable bank 3 interrupts (events from GP3[15-0]), set bit 3 in BINTEN.
For detailed information on BINTEN, see
20.2.10.3 Configuring GPIO Interrupt Edge Triggering
Each GPIO interrupt source can be configured to generate an interrupt on the GPIO signal rising edge,
falling edge, both edges, or neither edge (no event). The edge detection is synchronized to the GPIO
peripheral module clock.
The following four registers control the configuration of the GPIO interrupt edge detection:
1. The GPIO set rising edge interrupt register (SET_RIS_TRIG) enables GPIO interrupts on the
occurrence of a rising edge on the GPIO signal.
2. The GPIO clear rising edge interrupt register (CLR_RIS_TRIG) disables GPIO interrupts on the
occurrence of a rising edge on the GPIO signal.
3. The GPIO set falling edge interrupt register (SET_FAL_TRIG) enables GPIO interrupts on the
occurrence of a falling edge on the GPIO signal.
4. The GPIO clear falling edge interrupt register (CLR_FAL_TRIG) disables GPIO interrupts on the
occurrence of a falling edge on the GPIO signal.
To configure a GPIO interrupt to occur only on rising edges of the GPIO signal:
•
Write a logic 1 to the associated bit in SET_RIS_TRIG.
•
Write a logic 1 to the associated bit in CLR_FAL_TRIG.
To configure a GPIO interrupt to occur only on falling edges of the GPIO signal:
•
Write a logic 1 to the associated bit in SET_FAL_TRIG.
•
Write a logic 1 to the associated bit in CLR_RIS_TRIG.