Texas Instruments CC2650DK 사용자 설명서

다운로드
페이지 1570
Unused I/O Pins
11.6 Unused I/O Pins
By default, the I/O driver (output) and input buffer (input) are disabled at power on or reset, and thus the
I/O pin can safely be left unconnected (floating).
If the I/O pin is tri-stated and connected to a node with a different voltage potential; there might be a small
leakage current going through the pin. The same applies to an I/O pin configured as input, where the pin
is connected to a voltage source (for example VDD/2). The input is then an undefined value of either 0 or
1.
11.7 GPIO
The MCU GPIO is a general-purpose input/output which drives a number of physical I/O pads. GPIO
supports up to 31 programmable I/O pins. These pins are configured by the IOC module. To modify a
single GPIO output value, use the [GPIO:DOUT] registers (see ). To set up DIO1 as a GPIO output and
toggle the bit, use the following procedure. The power-management considerations are not considered
(see for more details).
1. Map DIO1 as a GPIO output by setting the [IOC:IOCFG1.PORT_ID] register to 0 (GPIO PORDTID).
2. Ensure DIO1 is set as output by clearing the [IOC:IOCFG1.IE] bit. More port configurations can also be
set in the [IOC:IOCFG1] register; see to , Port Configuration, for more details.
3. Set the data output enable bit for DIO1 in [GPIO:DOE31_0.DIO1] by issuing a read-modify-write
operation.
4. Toggle the DIO1 output by issuing an XOR operation on the [GPIO:DOUT3_0:DIO1] bit with 0x100.
5. Call the following driver library functions:
IOCPinTypeGpioOutput(0x1);
GPIOPinToggle(0x1);
871
SWCU117A – February 2015 – Revised March 2015
I/O Control
Copyright © 2015, Texas Instruments Incorporated