Functional Description
1197
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
General-Purpose Input/Outputs (GPIOs)
1. Write 0x0000.0040 to the HIBCTL register at offset 0x010 to enable 32.768-kHz Hibernation oscillator.
2. Write any data to be retained during power cut to the HIBDATA register at offsets 0x030-0x06F.
3. Configure the GPIOWAKEPEN and GPIOWAKELVL registers at offsets 0x540 and 0x544 in the GPIO
module. Enable the I/O wake pad configuration by writing 0x0000.0001 to the HIBIO register at offset
0x010.
4. When the IOWRC bit in the HIBIO register is read as 1, write 0x0000.0000 to the HIBO register to lock
the current pad configuration so that any other writes to the GPIOWAKEPEN and GPIOWAKELVL
register will be ignored.
5. The hibernation sequence may be initiated by writing 0x0000.0052 to the HIBCTL register.
The GPIOWAKESTAT register at offset 0x548 can be read to determine which port caused a wake pin
assertion.
17.3.3 Mode Control
The GPIO pins can be controlled by either software or hardware. Software control is the default for most
signals and corresponds to the GPIO mode, where the GPIODATA register is used to read or write the
corresponding pins. When hardware control is enabled via the GPIO Alternate Function Select
(GPIOAFSEL) register (see
), the pin state is controlled by its alternate function (that is,
the peripheral).
Further pin muxing options are provided through the GPIO Port Control (GPIOPCTL) register which
selects one of several peripheral functions for each GPIO. For information on the configuration options,
see .
NOTE:
If any pin is to be used as an ADC input, the appropriate bit in the GPIOAMSEL register
must be set to disable the analog isolation circuit.
17.3.4 Commit Control
The GPIO commit control registers provide a layer of protection against accidental programming of critical
hardware peripherals. Protection is provided for the GPIO pins that can be used as the four JTAG/SWD
pins and the NMI pin. For pin numbers, see . Writes to protected bits of the GPIO Alternate Function
Select (GPIOAFSEL) register (see
), GPIO Pull Up Select (GPIOPUR) register (see
), GPIO Pull-Down Select (GPIOPDR) register (see
), and GPIO Digital
Enable (GPIODEN) register (see
) are not committed to storage unless the GPIO Lock
(GPIOLOCK) register (see
) has been unlocked and the appropriate bits of the GPIO
Commit (GPIOCR) register (see
) have been set.
17.3.5 Pad Control
The pad control registers allow software to configure the GPIO pads based on the application
requirements. The pad control registers include the GPIODR2R, GPIODR4R, GPIODR8R, GPIODR12R,
GPIOODR, GPIOPUR, GPIOPDR, GPIOSLR, and GPIODEN registers. These registers control drive
strength, open-drain configuration, pullup and pulldown resistors, slew-rate control and digital input enable
for each GPIO. If 3.3 V is applied to a GPIO configured as an open-drain output, the output voltage will
depend on the strength of your pullup resistor. The GPIO pad is not electrically configured to output 3.3 V.
NOTE:
Port pins PL6 and PL7 operate as Fast GPIO pads, but have 4-mA drive capability only.
GPIO register controls for drive strength, slew rate and open drain have no effect on these
pins. The registers which have no effect are as follows: GPIODR2R, GPIODR4R,
GPIODR8R, GPIODR12R, GPIOSLR, and GPIOODR .
NOTE:
Port pins PM[7:4] operate as Fast GPIO pads but support only 2-, 4-, 6-, and 8-mA drive
capability. 10- and 12-mA drive are not supported. All standard GPIO register controls,
except for the GPIODR12R register, apply to these port pins.