Preliminary
www.ti.com
Architecture
4.2.3.3
Interrupt Line Release
When the host processor receives an interrupt request issued by the GPIO module, it can read the
corresponding GPIO_IRQSTATUS_n register to find out which input GPIO has triggered the interrupt.
After servicing the interrupt, the processor resets the status bit and releases the interrupt line by writing
a 1 in the corresponding bit of the GPIO_IRQSTATUS_n register. If there is still a pending interrupt
request to serve (all bits in the GPIO_IRQSTATUS_RAW_n register not masked by the
GPIO_IRQSTATUS_SET_n, which are not cleared by setting the GPIO_IRQSTATUS_CLR_n), the
interrupt line will be re-asserted.
4.2.4 General-Purpose Interface Basic Programming Model
4.2.4.1
Power Saving by Grouping the Edge/Level Detection
Each GPIO module implements four gated clocks used by the edge/level detection logic to save power.
Each group of eight input GPIO pins generates a separate enable signal depending on the edge/level
detection register setting (because the input is 32 bits, four groups of eight inputs are defined for each
GPIO module). If a group requires no edge/level detection, then the corresponding clock is gated (cut
off). Grouping the edge/level enable can save the power consumption of the module as described in the
following example.
If any of the registers:
•
GPIO_LEVELDETECT0
•
GPIO_LEVELDETECT1
•
GPIO_RISINGDETECT
•
GPIO_FALLINGDETECT
are set to 0101 0101h, then all clocks are active (power consumption is high);
are set to 0000 00FFh, then a single clock is active.
NOTE:
When the clocks are enabled by writing to the GPIO_LEVELDETECT0,
GPIO_LEVELDETECT1, GPIO_RISINGDETECT, and GPIO_FALLINGDETECT registers,
the detection starts after 5 clock cycles. This period is required to clean the
synchronization edge/level detection pipeline.
The mechanism is independent of each clock group. If the clock has been started before
a new setting is performed, the following is recommended: first, set the new detection
required; second, disable the previous setting (if necessary). In this way, the
corresponding clock is not gated and the detection starts immediately.
4.2.4.2
Set and Clear Instructions
The GPIO module implements the set-and-clear protocol register update for the data output and
interrupt enable registers. This protocol is an alternative to the atomic test and set operations and
consists of writing operations at dedicated addresses (one address for setting bit[s] and one address for
clearing bit[s]). The data to write is 1 at bit position(s) to clear (or to set) and 0 at unaffected bit(s).
Registers can be accessed in two ways:
•
Standard: Full register read and write operations at the primary register address
•
Set and clear (recommended): Separate addresses are provided to set (and clear) bits in registers.
Writing 1 at these addresses sets (or clears) the corresponding bit into the equivalent register;
writing a 0 has no effect.
Therefore, for these registers, three addresses are defined for one unique physical register. Reading
these addresses has the same effect and returns the register value.
533
SPRUGX9 – 15 April 2011
General-Purpose I/O (GPIO) Interface
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...