TMS320C6000 DSP GPIO Reference Guide
TMS320C6000 DSP GPIO Reference Guide
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty. Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products Applications
Amplifiers amplifier.ti.com Audio www.ti.com/audio
Data Converters dataconverter.ti.com Automotive www.ti.com/automotive
DSP dsp.ti.com Broadband www.ti.com/broadband
Interface interface.ti.com Digital Control www.ti.com/digitalcontrol
Logic logic.ti.com Military www.ti.com/military
Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork
Microcontrollers microcontroller.ti.com Security www.ti.com/security
Telephony www.ti.com/telephony
Video & Imaging www.ti.com/video
Wireless www.ti.com/wireless
Notational Conventions
This document uses the following conventions.
- Hexadecimal numbers are shown with the suffix h. For example, the
following number is 40 hexadecimal (decimal 64): 40h.
- When referencing specific register bits, the X in the register bit name is
replaced with the bit number; for example, GPXDIR refers to the bit field
of the GPIO direction register and GP15DIR refers to bit 15 of GPDIR.
J Each register figure shows a rectangle divided into fields that represent
the fields of the register. Each field is labeled with its bit name, its
beginning and ending bit numbers above, and its read/write properties
below. A legend explains the notation used for the properties.
J Reserved bits in a register figure designate a bit that is used for future
device expansion.
Trademarks
Contents
1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2 GPIO Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.1 GPIO Enable Register (GPEN) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2 GPIO Direction Register (GPDIR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.3 GPIO Value Register (GPVAL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.4 GPIO Delta High Register (GPDH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.5 GPIO Delta Low Register (GPDL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.6 GPIO High Mask Register (GPHM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.7 GPIO Low Mask Register (GPLM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.8 GPIO Global Control Register (GPGC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.9 GPIO Interrupt Polarity Register (GPPOL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figures
Tables
1 Overview
The general-purpose input/output (GPIO) peripheral provides dedicated
general-purpose pins that can be configured as either inputs or outputs. When
configured as an output, you can write to an internal register to control the state
driven on the output pin. When configured as an input, you can detect the state
of the input by reading the state of an internal register.
In addition, the GPIO peripheral can produce CPU interrupts and EDMA
events in different interrupt/event generation modes.
Power Down
Logic
Some GPIO pins are MUXed with other device pins. On a given device, all bits
may not be implemented for each GPIO register. Refer to the device-specific
datasheet for details on specific MUXing and for the availability of the register
bits. GPINT[0−15] are all synchronization events to the EDMA. However, only
GPINT0 and GPINT[4−7] are available as interrupt sources to the CPU.
GPIO
GP0 GPINT0
GP1 GPINT1
GP2 GPINT2
GP3 GPINT3
GP4 GPINT4
GP5 GPINT5
GP6 GPINT6
GP7 GPINT7
GP8 GPINT8 Interrupts to CPU
and synchronization
GP9 GPINT9
events to EDMA‡
GP10 GPINT10
GP11 GPINT11
GP12 GPINT12
GP13 GPINT13
GP14 GPINT14
GP15 GPINT15
Control Internal
registers peripheral bus
† Some of the GPn pins are MUXed with other device signals. The number of available GPn pins is device specific. Refer to the
device-specific datasheet for details.
‡ All GPINTn are synchronization events to the EDMA. Only GPINT0 and GPINT[4−7] are available as interrupts to the CPU.
2 GPIO Function
A GPIO pin can operate as a general-purpose input/output once it is enabled
in the GPIO enable register (GPEN). You can independently configure each
GPIO pin as either an input or an output using the GPIO direction register
(GPDIR). When configured as an output (GPXDIR bit = 1), the value in the
GPXVAL bit in the GPIO value register (GPVAL) is driven on the corresponding
GPn pin. When configured as an input (GPXDIR bit = 0), the state of the input
can be read from the corresponding GPXVAL bit. Refer to section 5 for details
on the GPIO registers.
To configure GP0 as a general-purpose output, the GP0M bit in the GPIO global
control register (GPGC) must be cleared to 0, in addition to setting the GPDIR
bit 0 in GPDIR to 1. See section 3.3 for details on GP0 configurations.
GP0DH
Edge
Detect
GP0DIR GP0DL
GP0VAL
GP0 pin
GP1DH
Edge
Detect
GP1DIR GP1DL
GP1VAL
GP1 pin
:
:
:
: GP15DH
Edge
Detect
GP15DIR GP15DL
GP15VAL
GP15 pin
- Pass-through mode
- Logic mode
GPINT
GP3 Logic Mode Logic 1
GP2 GPINT0_int GPINT0
GP1 0
GP0
† All GPINTn are synchronization events to the EDMA. Only GPINT0 and GPINT[4−7] are available as interrupts to the CPU.
As shown in Figure 5, to use the GP0 in pass-through mode, the GPINT0M bit
in GPGC must be cleared to 0. The GPINT0_int output from the pass-through
mode logic is MUXed with the GPINT output from the logic mode logic to
generate the GPINT0 interrupt/event. This is shown in Figure 4 and Figure 5.
Refer to section 5.8 and section 3.3 for details.
GPINT0M
GPINT signal 1 GPINT0
from logic mode
0
GPINT0POL
0
GPINT0_int
GP0VAL
1
GP0 pin
GPINT3POL
To interrupt
0 GPINT3 selector and
GP3VAL EDMA events†
1
GP3 pin
GPINT15POL
0 GPINT15
GP15VAL
1
GP15 pin
† All GPINTn are synchronization events to the EDMA. Only GPINT0 and GPINT[4−7] are available as interrupts to the CPU.
Figure 6 shows a block diagram of the logic mode logic. By default, GPINT is
asserted (high) when the logic combination of the input(s) is evaluated true.
By setting GPINTPOL = 1 in GPGC, GPINT is asserted (high) when the logic
combination of the input(s) is evaluated false. This negative function of the
GPINT is useful in indicating signal deassertions at the GPIO pins.
GPINTPOL
GP0 pin Mask Logic for: GPINT0M
0
GP1 pin Delta OR GPINT
1
Delta AND GPINT0
Value AND 1
To CPU
0
interrupt
selector
and EDMA
events
GP15 pin
GPINT0_int
From Pass Through
Mode Logic
The GPINT generation operates in one of three modes: Delta OR, Delta AND,
or Value AND. The GPINT generation is configured via two control bits in
GPGC, GPINTDV and LOGIC, in addition to the mask bits in GPHM and
GPLM. The GPINTDV bit in GPGC divides the logic mode into either Delta or
Value mode as follows:
- Delta Mode: Inputs to the interrupt/event mask logic are sourced from
GPDH and GPDL. GPINT is caused by the logic combination of the
transition on the GPIO pin(s).
- Value Mode: Inputs to the interrupt/event mask logic are sourced from
GPVAL. GPINT is caused by the logic combination of the value on the
GPIO pin(s).
The source to the logic mode mask logic is gated by GPHM and GPLM. In delta
mode, the GPDH bit is gated with the GPHM bit and the GPDL bit is gated with
the GPLM bit. In value mode, the value from the pin is gated with the GPHM
bit and the inverted value from the pin is gated with the GPLM bit.
Table 1 summarizes the three modes in logic mode and the setup of the
GPINTDV and LOGIC bits in GPGC.
GPGC Bit
GPINTDV LOGIC Logic Mode Section
0 0 Delta OR 3.2.1
1 0 Reserved —
Edge GP0DH
Detect GP0DL
GP0 pin
GP0LM
GP1HM
Edge GP1DH
Detect GP1DL LOGIC
GP1 pin GPINTPOL
GPINT_OR
GP1LM
0
0 GPINT
1
1
GP15HM
Edge GP15DH
Detect GP15DL
GP15 pin
GP15LM
GPINT_AND
from Delta AND
function output
Delta AND mode allows the generation of an interrupt/event after all of a set
of specified signals have undergone some specified transitions. GPINT is driven
active when both of the following conditions are true:
- All of the GPDH bits are asserted for the group of GPIO signals with the
GPHM bits set.
- All of the GPDL bits are asserted for the group of GPIO signals with the
GPLM bits set.
Since the GPDH and GPDL bits operate independently from one another and
have separate masks (GPHM and GPLM), GPINT can be generated based on
a signal transitioning from one state to another and back to the original state.
Figure 8 shows the functional block diagram of the Delta AND mode.
GP1HM
LOGIC
Edge GP1DH GPINTPOL
detect GP1DL
GP1 pin 0
GP1LM 0 GPINT
1
1
GPINT_AND
GP15HM
Edge GP15DH
detect GP15DL
GP15 pin
GP15LM
Note: The functional block diagram shows the mask logic as an OR with an inverter on the mask bit. This forces the OR to
evaluate true when the mask bit is disabled. This is strictly a functional block diagram. The actual implementation
prevents the GPINT from being asserted in the case that all of the mask bits are disabled.
Figure 9 shows the functional block diagram of the Value AND Mode.
GP1HM
LOGIC
GP1VAL GPINTPOL
GP1 pin 0
GP1LM 0 GPINT
1
1
GPINT_AND
GP15HM
GP15VAL
GP15 pin
GP15LM
Note: The functional block diagram shows the mask logic as an OR with an inverter on the mask bit. This forces the OR to
evaluate true when the mask bit is disabled. This is strictly a functional block diagram. The actual implementation
prevents the GPINT from being asserted in the case that all the mask bits are disabled.
- GPINT can generate a CPU interrupt and an EDMA event via GPINT0.
GPINT0_int 0
from pass through mode logic
GPINT0
GP0M 1 To CPU and EDMA
GPINT
from logic mode logic
GP0DIR
1
GP0 pin 0
GP0VAL
When GP0 is configured as an output (GP0DIR = 1), the GP0M bit controls
whether the GP0 signal operates in GPIO mode or in logic mode. In GPIO
mode (GP0M = 0), the value of the GP0VAL bit is driven out on GP0. In logic
mode (GP0M = 1), GPINT is driven out on GP0. When GP0 is configured as
an input, GP0M has no effect.
GPINT[1−15] GPINT[1−15] are the interrupt outputs from pass-through mode. GPINT[1−15]
reflect the value of GP[1−15] or GP[1−15] in pass-through mode.
5 Registers
The GPIO peripheral is configured through the registers listed in Table 3. See
the device-specific datasheet for the memory address of these registers.
Some GPIO signals are MUXed with other device signals. For these MUXed
signals, the signal functionality is controlled by the following:
- GPEN bit fields: A GPXEN bit n set to 1 indicates that the GPn pin
operates as a GPIO signal controlled by the remaining GPIO registers. A
GPXEN bit n cleared to 0 indicates that the GPn pin is disabled as a GPIO
pin; it operates in the other mode.
15 14 13 12 11 10 9 8
GP15EN GP14EN GP13EN GP12EN GP11EN GP10EN GP9EN GP8EN
R/W-0† R/W-0† R/W-0† R/W-0† R/W-0† R/W-0† R/W-0† R/W-0†
7 6 5 4 3 2 1 0
GP7EN GP6EN GP5EN GP4EN GP3EN GP2EN GP1EN GP0EN
R/W-1† R/W-1† R/W-1† R/W-1† R/W-1† R/W-0† R/W-0† R/W-1†
Legend: R = Read only; R/W = Read/Write; -n = value after reset
† The default values are device specific. Refer to the device-specific datasheet for the default values. The default values shown
are for C64x devices.
15−0 GPXEN OF(value) 0−FFFFh GPIO mode enable bit. A 16-bit unsigned value used to disable
(bit value = 0) or enable (bit value = 1) a GPn pin as a
general-purpose input/output pin.
When GPIO pins are configured as output pins, these pins do not have
high-impedance capability. At reset, GPIO output pins default to the value in
the GPIO value register (GPVAL), see section 5.3. If it is necessary to drive the
GPIO output to the high-impedance state, the GPIO pins can be configured
as an input pin and then changed to an output pin.
15 14 13 12 11 10 9 8
GP15DIR GP14DIR GP13DIR GP12DIR GP11DIR GP10DIR GP9DIR GP8DIR
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7DIR GP6DIR GP5DIR GP4DIR GP3DIR GP2DIR GP1DIR GP0DIR
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXDIR OF(value) 0−FFFFh GPn direction bit. A 16-bit unsigned value used to control the
direction (input = 0, output = 1) of a GPn pin. Applies when the
corresponding GPXEN bit in GPEN is set to 1.
15 14 13 12 11 10 9 8
GP15VAL GP14VAL GP13VAL GP12VAL GP11VAL GP10VAL GP9VAL GP8VAL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7VAL GP6VAL GP5VAL GP4VAL GP3VAL GP2VAL GP1VAL GP0VAL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXVAL OF(value) 0−FFFFh GPn value bit. A 16-bit unsigned value used to determine the
value detected at a GPn input/output pin. Applies when the
corresponding GPXEN bit in GPEN is set to 1.
15 14 13 12 11 10 9 8
GP15DH GP14DH GP13DH GP12DH GP11DH GP10DH GP9DH GP8DH
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7DH GP6DH GP5DH GP4DH GP3DH GP2DH GP1DH GP0DH
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXDH OF(value) 0−FFFFh GPn delta high bit. A 16-bit unsigned value used to determine if
a low-to-high transition is detected on the GPn input pin.
Applies when the corresponding GPn pin is enabled as an
input (GPXEN = 1 and GPXDIR = 0).
15 14 13 12 11 10 9 8
GP15DL GP14DL GP13DL GP12DL GP11DL GP10DL GP9DL GP8DL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7DL GP6DL GP5DL GP4DL GP3DL GP2DL GP1DL GP0DL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXDL OF(value) 0−FFFFh GPn delta low bit. A 16-bit unsigned value used to determine if
a high-to-low transition is detected on the GPn input pin.
Applies when the corresponding GPn pin is enabled as an
input (GPXEN = 1 and GPXDIR = 0).
15 14 13 12 11 10 9 8
GP15HM GP14HM GP13HM GP12HM GP11HM GP10HM GP9HM GP8HM
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7HM GP6HM GP5HM GP4HM GP3HM GP2HM GP1HM GP0HM
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXHM OF(value) 0−FFFFh GPn high mask bit. A 16-bit unsigned value used to disable (bit
value = 0) or enable (bit value = 1) an interrupt/event generation
based on either the corresponding GPXDH bit or GPXVAL bit.
Applies when the corresponding GPn pin is enabled as an
input (GPXEN = 1 and GPXDIR = 0).
15 14 13 12 11 10 9 8
GP15LM GP14LM GP13LM GP12LM GP11LM GP10LM GP9LM GP8LM
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GP7LM GP6LM GP5LM GP4LM GP3LM GP2LM GP1LM GP0LM
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPXLM OF(value) 0−FFFFh GPn low mask bit. A 16-bit unsigned value used to disable (bit
value = 0) or enable (bit value = 1) an interrupt/event generation
based on either the corresponding GPXDL bit or GPXVAL bit.
Applies when the corresponding GPn pin is enabled as an
input (GPXEN = 1 and GPXDIR = 0).
31 8
Reserved
R-0
7 6 5 4 3 2 1 0
Reserved GP0M GPINT0M Reserved GPINTPOL LOGIC GPINTDV
R-0 R/W-0 R/W-0 R-0 R/W-0 R/W-0 R/W-0
Table 11. GPIO Global Control Register (GPGC) Field Descriptions (Continued)
Bit field† symval† Value Description
2 GPINTPOL GPINT polarity bit. Applies only to logic mode (GPINT0M = 1).
1 LOGIC GPINT logic mode select bit. Applies only to logic mode
(GPINT0M = 1).
15 14 13 12 11 10 9 8
GPINT15POL GPINT14POL GPINT13POL GPINT12POL GPINT11POL GPINT10POL GPINT9POL GPINT8POL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
7 6 5 4 3 2 1 0
GPINT7POL GPINT6POL GPINT5POL GPINT4POL GPINT3POL GPINT2POL GPINT1POL GPINT0POL
R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0 R/W-0
Legend: R = Read only; R/W = Read/Write; -n = value after reset
15−0 GPINTXPOL OF(value) 0−FFFFh GPINTn polarity bit. A 16-bit unsigned value used to select a
rising edge (bit value = 0) or falling edge (bit value = 1) to
determine when GPINTn is asserted. Applies only to
pass-through mode (GPINT0M = 0 in GPGC).
Table 13 lists the changes made since the previous version of this document.
Index
GPGC 35
B GPHM 33
block diagram GPINT muxing with GP0 and/or GPINT0 25
C64x DSP 9 GPINT0M bit 35
event generation 13 GPINTDV bit 35
functional 12
GPINTPOL bit 35
GPINT generation in delta AND mode 21
GPINT generation in delta OR mode 18 GPINTXPOL bits 37
GPINT generation in logic mode 16 GPIO delta high register (GPDH) 31
GPINT generation in value AND mode 23 25 GPIO delta low register (GPDL) 32
GPINTn generation in pass-through mode 15 GPIO direction register (GPDIR) 29
GPIO 10 GPIO enable register (GPEN) 27
interrupt generation 13
GPIO global control register (GPGC) 35
GPIO high mask register (GPHM) 33
D GPIO interrupt polarity register (GPPOL) 37
GPIO low mask register (GPLM) 34
delta AND mode 20
GPIO value register (GPVAL) 30
delta OR mode 18
GPLM 34
GPPOL 37
E GPVAL 30
GPXDH bits 31
event generation 13
GPXDIR bits 29
events 26
GPXDL bits 32
GPXEN bits 28
F GPXHM bits 33
GPXLM bits 34
function 11
GPXVAL bits 30
G I
GP0M bit 35 interrupt and event generation
GPDH 31 logic mode 15
GPDIR 29 pass-through mode 14
GPDL 32 interrupt generation 13
GPEN 27 interrupts 26
L R
registers 27
LOGIC bit 35
GPIO delta high register (GPDH) 31
logic mode 15 GPIO delta low register (GPDL) 32
GPIO direction register (GPDIR) 29
GPIO enable register (GPEN) 27
GPIO global control register (GPGC) 35
N GPIO high mask register (GPHM) 33
GPIO interrupt polarity register (GPPOL) 37
notational conventions 3 GPIO low mask register (GPLM) 34
GPIO value register (GPVAL) 30
related documentation from Texas Instruments 3
revision history 39
O
overview 9 T
trademarks 4
P V
pass-through mode 14 value AND mode 23