Texas Instruments CC2650DK Benutzerhandbuch

Seite von 1570
I/O Mapping and Configuration
11.3.3 Map 32-kHz System Clock (LF Clock) to DIO/PIN
The AON IOC contains the output enable control for the 32-kHz LF system clock output, and the clock
signal has its own PORTID called AON_CLK32K (0x7). This makes it easy to output the clock signal to a
pin. Map the clock to a chosen DIO, and enable the clock output by setting the
[AON_IOC:CLK32KCTL.OE_N] to 0x0. The following two driverlib calls achieve the same result:
IOCPortConfigureSet(IOIDn, IOC_PORT_AON_CLK32K, IOC_STD_OUTPUT);
AONIOC32kHzOutputEnable();
This outputs the LF system clock signal in all power modes except for shutdown.
11.4 Edge Detection on Pin (DIO)
The AON IOC supports detection of positive or negative edges on the digital I/Os, and provides the
resulting events to the AON event fabric. The edge detect event can be cleared by both the MCU GPIO
and the AUX. The edge detect event can also be cleared from MCU IOC by doing a disable or enable
cycle of the edge configuration. The MCU GPIO has a separate clear line to each edge detection cell,
while the AUX uses a single line to clear all events on pins connected to the AUX. When clearing from
AUX, all events related to AUX I/Os are cleared.
The EDGE DETECT block uses an edge-detect cell for each I/O. Each detection cell can flag edge-
detected and interrupt. The interrupt signals from all cells are oRed together to form a single interrupt line
toward the AON event fabric.
The AON IOC can also generate an interrupt event when any programmable subset of the input I/Os
generates an event. The registers controlling the edge-detect circuit reside in the MCU IOC, but the values
for the configuration are latched in the MCU latch in the AON IOC.
11.4.1 Configure DIO as GPIO Input to Generate Interrupt on EDGE DETECT
Interrupt and edge detect event generation from DIOs is configured through the bit fields EDGE_IRQ_EN
and EDGE_DET in the [IOC:IOCFGn] registers.. The DIO must be configured as a GPIO input. A GPIO
edge-detect event is sent to the CPU interrupt IRQ0 (vector number 16). This interrupt must be enabled to
call the GPIO interrupt handler. In this interrupt handler, the event source must be cleared by clearing the
relevant DIOn bit in the [GPIO:EVFLAGS31] event register. Reading this register returns 1 for triggered
events, and 0 for non triggered events. The event is cleared from the MCU IOC by toggling the enabled
EDGE_DET configuration. The event is cleared when the active-edge configuration is disabled
[IOC:IOCFGn.EDGE_DET] set to 0..
11.5 AON IOC State Latching When Powering Off the MCU Domain
The I/O configurations and states can be retained when the MCU and/or AUX domain is powered off.
Before powering down the MCU domain, the pin configuration and output values from MCU peripherals
mapped to pins (DIOs) through the MCU IOC must be latched in AON IOC. This is done by disabling the
transparent mode in the [AON_IOC:IOLATCH] register. Before enabling the transparent mode after MCU
is powered up again, the MCU IOC configuration must be reconfigured to the state it was in before power
down.
If the sensor controller application is using I/Os and simultaneously power cycling the AUX power domain,
the I/O signals should be latched (static configuration). There are latches in AON that latch the signals
coming from AUX to the GPIO pins. The [AUX_WUC:AUXIOLATCH] register controls this latch. The reset
state of this register is that the latches are closed (in other words, not transparent). Before any IOs can be
used, this latch must be opened by writing 0x1 to the [AUX_WUC:AUXIOLATCH] register. The latches
should be closed again before powering off the AUX domain. There are more constraints and reliability
issues to consider before powering off a domain; for more details refer to .
870
I/O Control
SWCU117A – February 2015 – Revised March 2015
Copyright © 2015, Texas Instruments Incorporated