Created for the Internet of Things (IoT), the SimpleLink CC3200 device is a wireless MCU that integrates
a high-performance ARM Cortex-M4 MCU, allowing customers to develop an entire application with a
single IC. With on-chip Wi-Fi, Internet, and robust security protocols, no prior Wi-Fi experience is required
for faster development.
The applications MCU subsystem contains an industry-standard ARM Cortex-M4 core running at 80 MHz.
The device includes a wide variety of peripherals, including a fast parallel camera interface, I2S, SD,
UART, SPI, I2C, and four-channel ADC. The CC3200 family includes flexible embedded RAM for code
and data and ROM with external serial flash bootloader and peripheral drivers.
The Wi-Fi network processor subsystem features a Wi-Fi Internet-on-a-chip, and contains an additional
dedicated ARM MCU that completely offloads the applications MCU. This subsystem includes an 802.11
b/g/n radio, baseband, and MAC with a powerful crypto engine for fast, secure Internet connections with
256-bit encryption. The CC3200 device supports Station, Access Point, and Wi-Fi Direct modes. The
device also supports WPA2 personal and enterprise security and WPS 2.0. The Wi-Fi Internet-on-a-chip
includes embedded TCP/IP and TLS/SSL stacks, HTTP server, and multiple Internet protocols.
About This Manual
This manual describes the modules and peripherals of the SimpleLink CC3200 wireless MCU. Each
description presents the module or peripheral in a general sense. Not all features and functions of all
modules or peripherals may be present on all devices. Pin functions, internal signal connections, and
operational parameters differ from device to device. The user should consult the device-specific data
sheet for these details.
Introduction
1.1.1 Related Documentation
Additional documentation about the device can be accessed from these links from Texas Instruments
http://www.ti.com/simplelinkwifi and http://www.ti.com/simplelinkwifi-wiki
1.1.2 Register Bit Conventions
Each register is shown with a key indicating the accessibility of the individual bit, and the initial condition:
Table 1-1. Register Bit Accessibility and Initial Condition
Key BitAccessibility
rwRead/write
rRead only
r0Read as 0
r1Read as 1
wWrite only
w0Write as 0
w1Write as 1
(w)
h0Cleared by hardware
h1Set by hardware
-0, -1Condition after PUC
-(0), -(1)Condition after POR
-[0], -[1]Condition after BOR
-{0},-{1}Condition after Brownout
No register bit implemented; writing a 1 results in a pulse. The register bit is always read
The following sections provide an overview of the main components of the CC3200 system on chip (SoC)
from a microcontroller point of view.
1.3.1 Processor Core
1.3.1.1ARM CortexTMM4 Processor Core
The CC3200 application MCU subsystem is built around an ARM Cortex-M4 processor core, which
provides outstanding computational performance and exceptional system response to interrupts at low
power consumption while optimizing memory footprint – making it an ideal fit for embedded applications.
Key features of ARM Cortex-M4 processor core are:
•Thumb-2 mixed 16- and 32-bit instruction set delivers the high performance expected of a 32-bit ARM
core in a compact memory size – enabling richer applications within a given device memory size.
•Single-cycle multiply instruction and hardware divide
•Atomic bit manipulation (bit-banding), delivering maximum memory use and streamlined peripheral
control
•Unaligned data access, enabling data to be efficiently packed into memory
•Deterministic, high-performance interrupt handling for time-critical applications
•Bit-band support for memory and select peripherals that includes atomic bit-band write and read
operations
•Configurable 4-pin JTAG and 2-pin (SWJ-DP) debug access
•Flash patch and breakpoint (FPB) unit to implement breakpoints and code patches
•Ultra-low power sleep modes
•Low active power consumption
•80-MHz operation
Functional Overview
1.3.1.2System Timer (SysTick)
The ARM Cortex-M4 processor core includes an integrated system timer, SysTick. SysTick provides a
simple, 24-bit, clear-on-write, decrementing, wrap-on-zero counter with a flexible control mechanism. The
counter is clocked on the system clock.
SysTick makes OS porting between Cortex-M4 devices much easier because there is no need to change
the OS system timer code. The SysTick timer integrates with the NVIC and can generate a SysTick
exception (exception type 15). In many OSes, a hardware timer generates interrupts so that the OS can
perform task management (for example, to allow multiple tasks to run at different time slots and to ensure
that no single task can lock up the entire system). To perform this function, the timer must be able to
generate interrupts and, if possible, be protected from user tasks so that user applications cannot change
the timer behavior.
The counter can be used in several different ways; for example:
•An RTOS tick timer that fires at a programmable rate (for example, 100 Hz) and invokes a SysTick
routine
•A high-speed alarm timer using the system clock
•A simple counter used to measure time to completion and time used
•An internal clock-source control based on missing or meeting durations
CC3200 includes the ARM NVIC. The NVIC and Cortex-M3 prioritize and handle all exceptions in handler
mode. The processor state is automatically stored to the stack on an exception and automatically restored
from the stack at the end of the interrupt service routine (ISR). The interrupt vector is fetched in parallel to
the state saving, thus enabling efficient interrupt entry. The processor supports tail-chaining, meaning that
back-to-back interrupts can be performed without the overhead of state saving and restoration. The NVIC
and Cortex-M4 processor prioritize and handle all exceptions in handler mode. The NVIC and the
processor core interface are closely coupled to enable low-latency interrupt processing and efficient
processing of late-arriving interrupts. The NVIC maintains knowledge of the stacked, or nested, interrupts
to enable tail-chaining of interrupts.
Key features are:
•Exceptional interrupt handling through hardware implementation of required register manipulations
•Deterministic, fast interrupt processing: always 12 cycles, or just 6 cycles with tail-chaining
•Programmable priority level for each interrupt
•Low-latency interrupt and exception handling
•Level and pulse detection of interrupt signals
•Grouping of interrupts into group priority and sub-priority interrupts
•Tail chaining of interrupts
1.3.1.4System Control Block
The system control block (SCB) provides system implementation information and system control, including
configuration, control, and reporting of system exceptions.
www.ti.com
1.3.2 Memory
1.3.2.1On-Chip SRAM
To enable low-cost applications, the CC3200 device family follows a flash-less approach. CC3200 has up
to 256KB of zero wait state, on-chip SRAM, to which application programs are downloaded and executed.
The SRAM is used for both code and data, and is connected to the Multi-Layer-AHB bus-matrix of the
chip. There is no restriction on relative size or partitioning of code and data.
The micro direct memory access (μDMA) controller can transfer data to and from SRAM and various
peripherals. The SRAM banks implement an advanced 4-way interleaved architecture which almost
eliminates the performance penalty when DMA and processor simultaneously access the SRAM.
Internal RAM has selective retention capability during low-power deep-sleep (LPDS) mode. Based on
need, during LPDS mode the application can choose to retain 256KB, 192KB, 128KB or 64KB. Retaining
the memory during low power mode provides a faster wakeup. TI provides an easy to use power
management framework for processor and peripheral context save and restore mechanism based on
SRAM retention. For more information, refer to the Power Management Framework User Guide in
Section 15.6.
1.3.2.2ROM
CC3200 comes with factory programmed zero-wait-state ROM with the following firmware components:
•Device initialization
•Bootloader
•Peripheral driver library (DriverLib) release for product-specific peripherals and interfaces
When CC3200 powers up, or chip reset is released or returns from hibernate mode, the device
initialization procedure is executed first. After the chip hardware has been correctly configured, the
bootloader is executed, which loads the application code from non-volatile memory into on-chip SRAM
and makes a jump to the application code entry point.
The CC3200 DriverLib is a software library that controls on-chip peripherals. The library performs both
peripheral initialization and control functions, with a choice of polled or interrupt-driven peripheral support.
The ROM DriverLib provides a rich set of drivers for peripheral and chip. It is aimed at reducing
application development time and improving solution robustness. TI recommends that applications make
extensive use of the DriverLib APIs to optimize memory and MIPS requirement of end applications.
1.3.3 Micro Direct Memory Access Controller (µDMA)
The CC3200 microcontroller includes a multichannel DMA controller, or μDMA. The μDMA controller
provides a way to offload data-transfer tasks from the Cortex-M4 processor, allowing more efficient use of
the processor and the available bus bandwidth. The μDMA controller can perform transfers between
memory and peripherals; it has dedicated channels for each supported on-chip module. The μDMA
controller can be programmed to automatically perform transfers between peripherals and memory as the
peripheral is ready to transfer more data.
The μDMA controller provides the following features:
•32 configurable channels
•80-MHz operation
•Support for memory to memory, memory to peripheral, and peripheral to memory in multiple transfer
modes
– Basic and simple transfer scenarios
– Ping-Pong for continuous data flow
– Scatter-gather for a programmable list of arbitrary transfers initiated from a single request
•Highly flexible and configurable channel operation
– Independently configured and operated channels
– Dedicated channels for supported on-chip modules
– One channel each for receive and transmit path for bidirectional modules
– Dedicated channel for software-initiated transfers
– Per-channel configurable bus arbitration scheme
– Software-initiated requests for any channel
•Two levels of priority
•Design optimizations for improved bus access performance between the µDMA controller and the
processor core
•Transfer size is programmable in binary steps from 1 to 1024
•Source and destination address increment size of byte, half-word, word, or no increment
•Maskable peripheral requests
•Interrupt on transfer completion, with a separate interrupt per channel
Functional Overview
1.3.4 General Purpose Timer (GPT)
The CC3200 includes 4 instances of 32-bit user-programmable general purpose timers. GPTs count or
time external events that drive the timer input pins. Each GPT module (GPTM) block provides two 16-bit
timers or counters that can be configured to operate independently as timers or event counters, or
configured to operate as one 32-bit timer. The GPTM contains GPTM blocks with the following functional
options:
•Operating modes:
– 16- or 32-bit programmable one-shot timer
– 16- or 32-bit programmable periodic timer
– 16-bit general-purpose timer with an 8-bit prescaler
– 16-bit input-edge count or time-capture modes
– 16-bit pulse-width modulation (PWM) mode with software-programmable output inversion of the
PWM signal
•Count up or down
•Ability to determine the elapsed time between the assertion of the timer interrupt and entry into the ISR
•Can trigger efficient transfers using the µDMA.
– Dedicated channel for each timer
– Burst request generated on timer interrupt
1.3.5 Watch Dog Timer (WDT)
The watchdog timer in the CC3200 restarts the system when it gets stuck due to an error and does not
respond as expected. The watchdog timer can be configured to generate an interrupt to the
microcontroller on its first time-out, and to generate a reset signal on its second time-out. Once the
watchdog timer is configured, the lock register can be written to prevent the timer configuration from being
inadvertently altered.
The watchdog timer provides the following features:
•32-bit down-counter with a programmable load register
•Programmable interrupt generation logic with interrupt masking
•Lock register protection from runaway software
•Reset generation logic
www.ti.com
1.3.6 Multi-Channel Audio Serial Port (McASP)
CC3200 includes a configurable multichannel audio serial port for glue-less interfacing to audio CODEC
and DAC (speaker drivers). The audio port has two serializer / deserializers that can be individually
enabled to either transmit or receive and operate synchronously. Key features are:
•Two stereo I2S channels
– One stereo receive and one stereo transmit lines
– Two stereo transmit lines
•Programmable clock and frame-sync polarity (rising or falling edge)
•Programmable word length (bits per word): 16 and 24 bits
•Programmable fractional divider for bit-clock generation, up to 9 MHz.
1.3.7 Serial Peripheral Interface (SPI)
The serial peripheral interface (SPI) is a four-wire bidirectional communications interface that converts
data between parallel and serial. The SPI module performs serial-to-parallel conversion on data received
from a peripheral device, and parallel-to-serial conversion on data transmitted to a peripheral device. The
SPI allows a duplex serial communication between a local host and SPI-compliant external devices.
The CC3200 includes one SPI port dedicated to the application. Key features are
•Programmable interface operation for Freescale SPI, MICROWIRE, or TI synchronous serial interfaces
master and slave modes
•3-pin and 4-pin mode
•Full duplex and half duplex
•Serial clock with programmable frequency, polarity, and phase
•Up to 20-MHz operation
•Programmable chip select polarity
•Programmable delay before the first SPI word is transmitted
•Programmable timing control between chip select and external clock generation
•No dead cycle between two successive words in slave mode
•SPI word lengths of 8, 16, and 32 bits
•Efficient transfers using the μDMA controller
•Programmable interface operation for Freescale SPI, MICROWIRE, or TI-SSI
1.3.8 Inter-Integrated Circuit Interface (I2C)
The inter-integrated circuit (I2C) bus provides bidirectional data transfer through a two-wire design (a
serial data line SDA and a serial clock line SCL). The I2C bus interfaces to a wide variety of external I2C
devices such as sensors, serial memory, control ports of image sensors, and audio codecs. Multiple slave
devices can be connected to the same I2C bus. The CC3200 microcontroller includes one I2C module
with the following features:
•Master and slave modes of operation
•Master with arbitration and clock synchronization
A universal asynchronous receivers/transmitter (UART) is an integrated circuit used for RS-232 serial
communications. UARTs contain a transmitter (parallel-to-serial converter) and a receiver (serial-toparallel converter), each clocked separately.
The CC3200 device includes two fully programmable UARTs. The UART can generate individuallymasked interrupts from the RX, TX, modem status, and error conditions. The module generates a single
combined interrupt when any of the interrupts are asserted and unmasked.
The UARTs include the following features:
•Programmable baud-rate generator, allowing speeds up to 3 Mbps
•Separate 16 × 8 transmit (TX) and receive (RX) FIFOs to reduce CPU interrupt service loading
•Programmable FIFO length, including 1-byte deep operation providing conventional double-buffered
interface
•FIFO trigger levels of 1/8, 1/4, 1/2, 3/4, and 7/8
•Standard asynchronous communication bits for start, stop, and parity
•Line-break generation and detection
•Fully programmable serial interface characteristics:
– 5, 6, 7, or 8 data bits
– Even, odd, stick, or no-parity bit generation and detection
– 1 or 2 stop-bit generation
•RTS and CTS modem handshake support
•Standard FIFO-level and end-of-transmission interrupts
•Efficient transfers using µDMA
– Separate channels for transmit and receive
– Receive single request asserted when data is in the FIFO; burst request asserted at programmed
FIFO level
– Transmit single request asserted when there is space in the FIFO; burst request asserted at
All digital pins of the CC3200 device and some of the analog pins can be used as a general-purpose
input/output (GPIO). The GPIOs are grouped as 4 instance GPIO modules, each 8-bit. Supported features
include:
•Up to 24 GPIOs, depending on the functional pin configuration
•Interrupt capability for all GPIO pins
– Level or edge sensitive
– Rising or falling edge
– Selective interrupt masking
•Can trigger DMA operation
•Selectable wakeup source (one out of 6 pins)
•Programmable pad configuration
– Internal 5 µA pull-up and pull-down
– Configurable drive strength of 2, 4, 6, 8, 10, 12, and 14 mA
– Open-drain mode
•GPIO register readable through the high-speed internal bus matrix
1.3.11 Analog to Digital Converter (ADC)
The ADC peripheral converts a continuous analog voltage into a discrete digital number. The CC3200
device includes ADC modules with four input channels. Each ADC module features 12-bit conversion
resolution for the four input channels. Features include:
•Number of bits: 12-bit
•Effective nominal accuracy: 10 bits
•Four analog input channels
•Automatic round-robin sampling
•Fixed sampling interval of 16 µs per channel
•Automatic 16-bit time-stamping of every ADC samples based on the system clock
•Dedicated DMA channel to transfer ADC channel data to the application RAM.
www.ti.com
1.3.12 SD Card Host
The CC3200 includes an SD-Host interface for applications that require mass storage. The SD-Host
interface support is limited to 1-bit mode due to chip pin constraints.
1.3.13 Parallel Camera Interface
The CC3200 includes an 8-bit parallel camera port to enable image sensor-based applications.
1.3.14 Debug Interface
The CC3200 supports both IEEE Standard 1149.1 JTAG (4-wire) and the low-pin-count ARM SWD (2wire) debug interfaces. Depending on the board level configuration of the sense-on-power pull resistors,
by default the chip powers up with either the 4-wire JTAG or the 2-wire SWD interface.
As shown in Figure 1-1, the 4-wire JTAG signals from the chip pins are routed through an IcePick module.
TAPs other than the application MCU are reserved for TI production testing. A TAP select sequence must
be sent to the device to connect to the ARM Cortex M4 JTAG TAP. The 2-wire mode, however, directly
routes the ARM SWD-TMS and SWD-TCK pins directly to the respective chip pins.
The secure variant of the CC3200 includes a suite of high-throughput, state-of-the-art hardware
accelerators for fast computation of ciphers (AES, DES, 3-DES), hashing (SHA, MD5), and CRC
algorithms by the application. It is also referred as the data hashing and transform engine (DTHE). Further
details about the hardware cryptography accelerator will be addressed in the revision of this manual.
NOTE: Present production devices have the Crypto unlocked (Fuse Farm); a user application can
use these.
NOTE: Secure MCU ensures secure booting of the user application using the crypto engines. This
feature will be available in future revisions of the device.
1.3.16 Clock, Reset, and Power Management
The CC3200 system-on-chip includes the necessary clock and power management functionalities to build
a standalone battery-operated low power solution. Key features are:
•PA-DCDC: Produces regulated 1.8 V with extremely fast transient regulation for the WLAN RF
Transmit Power Amplifier. This is bypassed in the regulated 1.85-V configuration.
– A set of low dropout regulators (LDOs) are used in the radio subsystem to further regulate and filter
the ANA1-DCDC output before being fed to the analog circuits.
– On-chip factory-trimmed accurate band-gap voltage reference ensures the regulator outputs are
stable across process and temperature.
1.3.17 SimpleLink Subsystem
The SimpleLink subsystem provides fast, secured WLAN and Internet connections with 256-bit encryption.
The CC3200 device supports station, AP, and Wi-Fi Direct modes. The device also supports WPA2
personal and enterprise security and WPS 2.0. The Wi-Fi network processor includes an embedded IPv4
TCP/IP stack.
This multi-processor subsystem consists of the following:
•IPv4 network processor and Wi-Fi driver
•802.11 b/g/n MAC
•802.11 b/g/n PHY
•802.11 b/g/n Radio
The SimpleLink subsystem is accessible from the application MCU over an asynchronous link, and can be
controlled through a complete set of SimpleLink host driver APIs provided as part of the ROM driver
library. The mode of usage is similar to that of an external MCU using the CC3100 device.
The co-location of the Wi-Fi subsystem on the same die imposes a few restrictions on the application
MCU. These will be covered in detail in Chapter 15.
www.ti.com
1.3.18 I/O Pads and Pin Multiplexing
The device makes extensive use of pin multiplexing to accommodate the large number of peripheral
functions in the smallest possible package. To achieve this configuration, pin multiplexing is controlled
using a combination of hardware configuration (at device reset) and register control.
The I/O pad and pin mux sections feature flexible wide-voltage I/Os. Supported features include:
•Programmable drive strength from 2 mA to 14 mA (nominal condition) in steps of 2 mA.
•Open drain mode
•Output buffer isolation
•Automatic output isolation during reset and hibernate
•Configurable pull-up and pull-down (10 µA nominal)
•Software-configurable pad state retention during LPDS
The CC3200 incorporates a dedicated instance of the ARM Cortex-M4 CPU core for executing application
code with or without RTOS. This processor core is not used in any manner for running any networking or
device management task.
This dedicated ARM Cortex-M4 core, along with large on-chip SRAM, a rich set of peripherals, and
advanced DC-DC-based power management, provides a robust, contention-free, high-performance
application platform at much lower power, lower cost, and smaller solution size when compared to
solutions based on discrete MCUs.
Features include:
•32-bit ARM Cortex-M4 architecture optimized for small-footprint embedded applications
•80-MHz operation
•Fast interrupt handling
•Thumb-2 mixed 16-/32-bit instruction set delivers the high performance expected of a 32-bit ARM core
in a compact memory size usually associated with 8- and 16-bit devices, typically in the range of a few
kilobytes of memory for microcontroller-class applications.
– Single-cycle multiply instruction and hardware divide
– Atomic bit manipulation (bit-banding), delivering maximum memory utilization and streamlined
peripheral control
– Unaligned data access, enabling data to be efficiently packed into memory
•16-bit SIMD vector processing unit
•3-stage pipeline Harvard architecture
•Hardware division and fast digital-signal-processing orientated multiply accumulate
•Saturating arithmetic for signal processing
•Deterministic, high-performance interrupt handling for time-critical applications
•Enhanced system debug with extensive breakpoints
•Serial-wire debug and serial-wire trace reduce the number of pins required for debugging and tracing
•Low-power consumption with multiple sleep modes
The ARM Cortex-M4 application processor core in the CC3200 does not include the floating point unit and
memory protection unit (FPU and MPU).
This chapter provides information on the implementation of the Cortex-M4 application processor in the
CC3200, including the programming model, the memory model, the exception model, fault handling, and
power management.
For technical details on the instruction set, see the Cortex-M4 instruction set chapter in the ARM®Cortex™-M4 Devices Generic User Guide (ARM DUI 0553A).
The Cortex-M4 application processor in the CC3200 provides multiple interfaces using AMBA™
technology to provide high-speed, low-latency memory accesses. The core supports unaligned data
accesses and implements atomic bit manipulation that enables faster peripheral controls, system
spinlocks, and thread-safe Boolean data handling.
2.1.3Integrated Configurable Debug
The Cortex-M4 application processor implements an ARM CoreSight™-compliant serial wire JTAG-debug
port (SWJ-DP) interface. The SWJ-DP interface combines the SWD and JTAG debug ports into one
module. See the ARM Debug Interface V5 Architecture Specification for details on SWJ-DP.
The 4-bit trace interface from embedded trace macrocell (ETM) is not supported in the CC3200 due to pin
limitations. Instead, the processor integrates an instrumentation trace macrocell (ITM) alongside data
watchpoints and a profiling unit. A serial-wire viewer (SWV) can export a stream of software-generated
messages (printf style debug), data trace, and profiling information through a single pin to enable simple
and cost-effective profiling of the system trace events.
The flash patch and breakpoint unit (FPB) provides up to eight hardware breakpoint comparators for
debugging. The comparators in the FPB also provide remap functions for up to eight words of program
code in the code memory region. FPB also provides code patching capability; however, as the CC3200
application processor implements and executes from SRAM architecture, this type of patching is no longer
required.
For more information on the Cortex-M4 debug capabilities, see the ARM Debug Interface V5 Architecture
Specification.
The TPIU acts as a bridge between the Cortex-M4 trace data from the ITM, and an off-chip trace port
analyzer, as shown in Figure 2-2.
Figure 2-2. TPIU Block Diagram
2.1.5 Cortex-M4 System Component Details
The Cortex-M4 application processor core includes the following system components:
•SysTck
A 24-bit count-down timer used as a real-time operating system (RTOS) tick timer or as a simple
counter (see Section 3.2.1).
•Nested Vectored Interrupt Controller (NVIC)
An embedded interrupt controller that supports low-latency interrupt processing (see Nested VectoredInterrupt Controller (NVIC) in Section 3.2.2).
•System Control Block (SCB)
The programming model interface to the processor. The SCB provides system implementation
information and system control, including configuration, control, and reporting of system exceptions
(see System Control Block (SCB) in Section 3.2.3).
www.ti.com
2.2Functional Description
2.2.1 Programming Model
This section describes the Cortex-M4 programming model and includes the individual core register
descriptions, information about the processor modes, and privilege levels for software execution and
stacks.
2.2.1.1Processor Mode and Privilege Levels for Software Execution
The Cortex-M4 has two modes of operation:
•Thread mode, to execute application software. The processor enters thread mode when it comes out
of reset.
•Handler mode, to handle exceptions. When the processor has finished exception processing, it returns
36
to thread mode.
In addition, the Cortex-M4 has two privilege levels:
•Underprivileged
In this mode, the software has the following restrictions:
– Limited access to the MSR and MRS instructions, and no use of the CPS instruction
– No access to the system timer, NVIC, or system control block
– Possibly restricted access to memory or peripherals
•Privileged
In this mode, the software can use all instructions and has access to all resources
In thread mode, the CONTROL register controls whether software execution is privileged or unprivileged.
In handler mode, software execution is always privileged.
Only privileged software can write to the CONTROL register to change the privilege level for software
execution in thread mode. Unprivileged software can use the SVC instruction to make a supervisor call to
transfer control to privileged software.
2.2.1.2Stacks
The processor uses a full descending stack, meaning that the stack pointer indicates the last stacked item
on the memory. When the processor pushes a new item onto the stack, it decrements the stack pointer,
then writes the item to the new memory location. The processor implements two stacks: the main stack
and the process stack, with a pointer for each held in independent registers (see the SP register).
In thread mode, the CONTROL register controls whether the processor uses the main stack or the
process stack. In handler mode, the processor always uses the main stack. The options for processor
operations are shown in Table 2-1.
This section lists and describes the Cortex-M4 registers. The core registers are not memory-mapped, and
are accessed by register name rather than offset.
NOTE: The register type shown in the register descriptions refers to type during program execution
in thread mode and handler mode. Debug access may differ.
The Rn registers are 32-bit general-purpose registers for data operations, and can be accessed from
either privileged or unprivileged mode.
2.2.2.1.2.1 Stack Pointer (SP)
In thread mode, the function of this register changes depending on the ASP bit in the Control Register
(CONTROL) register. When the ASP bit is clear, this register is the main stack pointer (MSP). When the
ASP bit is set, this register is the process stack pointer (PSP). On reset, the ASP bit is clear, and the
processor loads the MSP with the value from address 0x0000 0000. The MSP can only be accessed in
privileged mode; the PSP can be accessed in either privileged or unprivileged mode.
Functional Description
Table 2-2. Processor Register Map (continued)
CC3200)
2.2.2.1.2.2 Link Register (LR)
The Link register (LR) stores the return information for subroutines, function calls, and exceptions. The
Link register can be accessed from either privileged or unprivileged mode.
EXC_RETURN is loaded into the LR on exception entry.
2.2.2.1.2.3 Program Counter (PC)
The program counter (PC) contains the current program address. On reset, the processor loads the PC
with the value of the reset vector, which is at address 0x0000 0004. Bit 0 of the reset vector is loaded into
the THUMB bit of the EPSR at reset and must be 1. The PC register can be accessed in either privileged
or unprivileged mode.
2.2.2.1.2.4 Program Status Register (PSR)
NOTE: This register is also referred to as xPSR.
The Program Status (PSR) register has three functions, and the register bits are assigned to the different
functions:
•Application Program Status (APSR) register, bits 31:27, bits 19:16
•Execution Program Status (EPSR) register, bits 26:24, 15:10
•Interrupt Program Status (IPSR) register, bits 7:0
The PSR, IPSR, and EPSR registers can only be accessed in privileged mode; the APSR register can be
accessed in either privileged or unprivileged mode.
APSR contains the current state of the condition flags from previous instruction executions. EPSR
contains the Thumb state bit and the execution state bits for the if-then (IT) instruction or the interruptiblecontinuable instruction (ICI) field for an interrupted load multiple or store multiple instruction. Attempts to
read the EPSR directly through application software using the MSR instruction always return zero.
Attempts to write the EPSR using the MSR instruction in application software are always ignored. Fault
handlers can examine the EPSR value in the stacked PSR to determine the operation that faulted.
IPSR contains the exception type number of the current interrupt service routine (ISR).
These registers can be accessed individually, or as a combination of any two or all three registers, using
the register name as an argument to the MSR or MRS instructions. For example, all of the registers can
be read using PSR with the MRS instruction, or APSR only can be written to using APSR with the MSR
instruction. Table 2-3 shows the possible register combinations for the PSR. See the MRS and MSR
instruction descriptions in the Cortex-M4 instruction set chapter in the ARM Cortex-M4 Devices Generic
User Guide (ARM DUI 0553A) for more information about how to access the program status registers.
Table 2-3. PSR Register Combinations
RegisterTypeCombination
PSRPSR R/W
IEPSRROEPSR and IPSR
IAPSRR/W
EAPSRR/W
(1)
The processor ignores writes to the IPSR bits.
(2)
Reads of the EPSR bits return zero, and the processor ignores writes to these bits
2.2.2.1.2.5 Priority Mask Register (PRIMASK)
The PRIMASK register prevents activation of all exceptions with programmable priority. Reset, nonmaskable interrupt (NMI), and hard fault are the only exceptions with fixed priority. Exceptions should be
disabled when they might impact the timing of critical tasks. This register is only accessible in privileged
mode. The MSR and MRS instructions are used to access the PRIMASK register, and the CPS instruction
may be used to change the value of the PRIMASK register. See the Cortex-M4 instruction set chapter in
the ARM Cortex-M4 Devices Generic User Guide (ARM DUI 0553A) for more information on these
instructions.
(1)
(2)
(1) (2)
www.ti.com
APSR, EPSR, and IPSR
APSR and IPSR
APSR and EPSR
2.2.2.1.2.6 Fault Mask Register (FAULTMASK)
The FAULTMASK register prevents activation of all exceptions except for the Non-Maskable Interrupt
(NMI). Exceptions should be disabled when they might impact the timing of critical tasks. This register is
only accessible in privileged mode. The MSR and MRS instructions are used to access the FAULTMASK
register, and the CPS instruction may be used to change the value of the FAULTMASK register. See the
Cortex™-M4 instruction set chapter in the ARM® Cortex™-M4 Devices Generic User Guide (ARM DUI
0553A) for more information on these instructions.
2.2.2.1.2.7 Base Priority Mask Register (BASEPRI)
The BASEPRI register defines the minimum priority for exception processing. When BASEPRI is set to a
nonzero value, it prevents the activation of all exceptions with the same or lower priority level as the
BASEPRI value. Exceptions should be disabled when they might impact the timing of critical tasks. This
register is only accessible in privileged mode.
2.2.2.1.2.8 Control Register (CONTROL)
The CONTROL register controls the stack used and the privilege level for software execution when the
processor is in thread mode, and indicates whether the FPU state is active. This register is only accessible
in privileged mode.
Handler mode always uses the MSP, so the processor ignores explicit writes to the ASP bit of the
CONTROL register when in handler mode. The exception entry and return mechanisms automatically
update the CONTROL register based on the EXC_RETURN value. In an OS environment, threads running
in thread mode should use the process stack, and the kernel and exception handlers should use the main
stack. By default, thread mode uses the MSP. To switch the stack pointer used in thread mode to the
PSP, either use the MSR instruction to set the ASP bit, as detailed in the Cortex-M4 instruction set
chapter in the ARM Cortex-M4 Devices Generic User Guide (ARM DUI 0553A), or perform an exception
return to thread mode with the appropriate EXC_RETURN value.
NOTE:When changing the stack pointer, software must use an ISB instruction immediately after
the MSR instruction, ensuring that instructions after the ISB execute use the new stack
pointer. See the Cortex-M4 instruction set chapter in the ARM Cortex-M4 Devices Generic
User Guide (ARM DUI 0553A).
2.2.2.1.3 Exceptions and Interrupts
The Cortex-M4 application processor in the CC3200 supports interrupts and system exceptions. The
processor and the nested vectored interrupt controller (NVIC) prioritize and handle all exceptions. An
exception changes the normal flow of software control. The processor uses handler mode to handle all
exceptions except for reset. See Section 2.2.4.7 for more information.
The NVIC registers control interrupt handling. See nested vectored interrupt controller (NVIC) for more
information.
2.2.2.1.4 Data Types
The Cortex-M4 supports 32-bit words, 16-bit halfwords, and 8-bit bytes. The processor also supports 64bit data transfer instructions. All instruction and data memory accesses are little endian.
2.2.3 Memory Model
This section describes the processor memory map, the behavior of memory accesses, and the bit-banding
features. The processor has a fixed memory map that provides up to 4 GB of addressable memory.
The memory map of the CC3200 microcontroller subsystem is provided in Table 2-4. In this manual,
register addresses are given as a hexadecimal increment, relative to the base address of the module, as
shown in the memory map.
The regions for SRAM and peripherals include bit-band regions. Bit-banding provides atomic operations to
bit data (see Section 2.2.3.1).
The processor reserves regions of the private peripheral bus (PPB) address range for core peripheral
registers (see the Cortex-M4 Peripherals, Chapter 3).
Functional Description
NOTE:Within the memory map, attempts to read or write addresses in reserved spaces result in a
bus fault. In addition, attempts to write addresses in the flash range also result in a bus fault.
Table 2-4. Memory Map
Start AddressEnd AddressDescriptionComment
0x0000.00000x0007.FFFFOn-chip ROM (Bootloader + DriverLib)
0x2000.00000x2003.FFFFBit-banded on-chip SRAM
0x4000.40000x4000.4FFFGPIO port A0
0x4000.50000x4000.5FFFGPIO port A1
0x4000.60000x4000.6FFFGPIO port A2
0x4000.70000x4000.7FFFGPIO port A3
0x4000.C0000x4000.CFFFUART A0
0x4000.D0000x4000.DFFFUART A1
0x4002.00000x4002.07FFI2C A0 (Master)
0xE000.10000xE000.1FFFData watchpoint and trace (DWT)
0xE000.20000xE000.2FFFFlash patch and breakpoint (FPB)
0xE000.E0000xE000.EFFFCortex-M4 Peripherals (NVIC, SysTick,SCB)
0xE004.00000xE004.0FFFTrace port interface unit (TPIU)
0xE004.10000xE004.1FFFReserved for embedded trace macrocell (ETM)
www.ti.com
Table 2-4. Memory Map (continued)
Bit band alias of 0x4000.0000 through
0x400F.FFFF
Used for external serial
flash
Used by application
processor
TM
2.2.3.1Bit-Banding
A bit-band region maps each word in a bit-band alias region to a single bit in the bit-band region. In ARM
Cortex-M4 architecture, the bit-band regions occupy the lowest 1 MB of the SRAM. Accesses to the 32MB SRAM alias region map to the 1-MB SRAM bit-band region, as shown in Table 2-5.
NOTE: A word access to the SRAM or the peripheral bit-band alias region maps to a single bit in the
SRAM or peripheral bit-band region.
A word access to a bit-band address results in a word access to the underlying memory, and
similarly for halfword and byte accesses. This allows bit-band accesses to match the access
requirements of the underlying peripheral.
The CC3200 family of Wi-Fi microcontrollers support up to 256 Kbyte of on-chip SRAM for code and data.
The SRAM starts from address 0x2000 0000.
StartEndMemory RegionInstruction and Data
0x2000.00000x2003.FFFFSRAM bit-band regionDirect accesses to this memory
0x2200.00000x23FF.FFFFSRAM bit-band aliasData accesses to this region
Table 2-5. SRAM Memory Bit-Banding Regions
Address Range
Accesses
range behave as SRAM
memory accesses, but this
region is also bit addressable
through bit-band alias.
are remapped to bit band
region. A write operation is
performed as read-modifywrite. Instruction accesses are
not remapped.
42
Bit-banding for peripherals is not supported in the CC3200.
Writing to a word in the alias region updates a single bit in the bit-band region.
Bit 0 of the value written to a word in the alias region determines the value written to the targeted bit in the
bit-band region. Writing a value with bit 0 set writes a 1 to the bit-band bit, and writing a value with bit 0
clear writes a 0 to the bit-band bit.
Bits 31:1 of the alias word have no effect on the bit-band bit. Writing 0x01 has the same effect as writing
0xFF. Writing 0x00 has the same effect as writing 0x0E.
When reading a word in the alias region, 0x0000 0000 indicates that the targeted bit in the bit-band region
is clear and 0x0000 0001 indicates that the targeted bit in the bit-band region is set.
2.2.3.1.2Directly Accessing a Bit-Band Region
Behavior of memory accesses describes the behavior of direct byte, halfword, or word accesses to the bitband regions.
2.2.3.2Data Storage
The processor views memory as a linear collection of bytes numbered in ascending order from zero. For
example, bytes 0-3 hold the first stored word, and bytes 4-7 hold the second stored word. Data is stored in
little-endian format, with the least-significant byte (lsbyte) of a word stored at the lowest-numbered byte,
and the most-significant byte (msbyte) stored at the highest-numbered byte. Figure 2-4 illustrates how
data is stored.
Functional Description
2.2.3.3Synchronization Primitives
The Cortex-M4 instruction set includes pairs of synchronization primitives which provide a non-blocking
mechanism that a thread or process can use to obtain exclusive access to a memory location. Software
can use these primitives to perform a guaranteed read-modify-write memory update sequence or for a
semaphore mechanism.
A pair of synchronization primitives consists of:
•A load-exclusive instruction, to read the value of a memory location and request exclusive access to
that location.
•A store-exclusive instruction, to attempt to write to the same memory location and return a status bit to
a register. If this status bit is clear, it indicates that the thread or process gained exclusive access to
the memory and the write succeeds; if this status bit is set, it indicates that the thread or process did
not gain exclusive access to the memory and no write was performed.
The pairs of load-exclusive and store-exclusive instructions are:
Software must use a load-exclusive instruction with the corresponding store-exclusive instruction. To
perform an exclusive read-modify-write of a memory location, software must:
1. Use a load-exclusive instruction to read the value of the location.
2. Modify the value, as required.
3. Use a store-exclusive instruction to attempt to write the new value back to the memory location.
4. Test the returned status bit. If the status bit is clear, the read-modify-write completed successfully. If
the status bit is set, no write was performed, which indicates that the value returned at Step 1 might be
out of date. The software must retry the entire read-modify-write sequence.
Software can use the synchronization primitives to implement a semaphore as follows:
1. Use a load-exclusive instruction to read from the semaphore address, to check whether the semaphore
is free.
2. If the semaphore is free, use a store-exclusive to write the claim value to the semaphore address.
3. If the returned status bit from Step 2 indicates that the store-exclusive succeeded, then the software
has claimed the semaphore. However, if the store-exclusive failed, another process might have
claimed the semaphore after the software performed Step 1.
The Cortex-M4 includes an exclusive access monitor that tags the fact that the processor has executed a
load-exclusive instruction. The processor removes its exclusive access tag if:
•It executes a CLREX instruction.
•It executes a store-exclusive instruction, regardless of whether the write succeeds.
•An exception occurs, which means the processor can resolve semaphore conflicts between different
threads.
For more information about the synchronization primitive instructions, see the Cortex-M4 instruction set
chapter in the ARM Cortex-M4 Devices Generic User Guide (ARM DUI 0553A).
www.ti.com
2.2.4 Exception Model
The ARM Cortex-M4 application processor in the CC3200 and the nested vectored interrupt controller
(NVIC) prioritize and handle all exceptions in handler mode. The processor state is automatically stored to
the stack on an exception, and automatically restored from the stack at the end of the interrupt service
routine (ISR). The vector is fetched in parallel to the state saving, enabling efficient interrupt entry. The
processor supports tail-chaining, which enables back-to-back interrupts to be performed without the
overhead of state saving and restoration.
Table 2-6 lists all exception types. Software can set eight priority levels on seven of these exceptions
(system handlers) as well as on 70 interrupts (listed in Table 2-6). Priorities on the system handlers are
set with the NVIC System Handler Priority n (SYSPRIn) registers. Interrupts are enabled through the NVIC
Interrupt Set Enable n (ENn) register and prioritized with the NVIC Interrupt Priority n (PRIn) registers.
Priorities can be grouped by splitting priority levels into preemption priorities and subpriorities. All the
interrupt registers are described in Section 3.2.2.
Internally, the highest user-programmable priority (0) is treated as fourth priority, after a reset, nonmaskable interrupt (NMI), and a hard fault, in that order. Note that 0 is the default priority for all the
programmable priorities.
NOTE: After a write to clear an interrupt source, it may take several processor cycles for the NVIC to
see the interrupt source de-assert. Thus, if the interrupt clear is done as the last action in an
interrupt handler, it is possible for the interrupt handler to complete while the NVIC sees the
interrupt as still asserted, causing the interrupt handler to be re-entered errantly. This
situation can be avoided by either clearing the interrupt source at the beginning of the
interrupt handler or by performing a read or write after the write to clear the interrupt source
(and flush the write buffer).
44
See nested vectored interrupt controller (NVIC) for more information on exceptions and interrupts.
•Inactive: The exception is not active and not pending.
•Pending: The exception is waiting to be serviced by the processor. An interrupt request from a
peripheral or from software can change the state of the corresponding interrupt to pending.
•Active: An exception being serviced by the processor but has not completed. An exception handler can
interrupt the execution of another exception handler. In this case, both exceptions are in the active
state.
•Active and Pending: The exception is being serviced by the processor, and there is a pending
exception from the same source.
2.2.4.2Exception Types
The exception types are:
•Reset: Reset is invoked on power up or a warm reset. The exception model treats reset as a special
form of exception. When reset is asserted, the operation of the processor stops, potentially at any point
in an instruction. When reset is deasserted, execution restarts from the address provided by the reset
entry in the vector table. Execution restarts as privileged execution in thread mode.
•NMI: A non-maskable interrupt (NMI) can be signaled using the NMI signal, or triggered by software
using the Interrupt Control and State (INTCTRL) register. This exception has the highest priority other
than reset. NMI is permanently enabled and has a fixed priority of –2. NMIs cannot be masked or
prevented from activation by any other exception or preempted by any exception other than reset. NMI
in the CC3200 is reserved for the internal system, and is not available for application usage.
•Hard Fault: A hard fault is an exception that occurs because of an error during exception processing,
or because an exception cannot be managed by any other exception mechanism. Hard faults have a
fixed priority of –1, meaning they have higher priority than any exception with configurable priority.
•Memory Management Fault: A memory management fault is an exception that occurs because of a
memory-protection-related fault, including access violation and no match. The MPU or the fixedmemory protection constraints determine this fault, for both instruction and data memory transactions.
This fault is used to abort instruction accesses to Execute Never (XN) memory regions, even if the
MPU is disabled.
•Bus Fault: A bus fault is an exception that occurs because of a memory-related fault for an instruction
or data memory transaction such as a prefetch fault or a memory access fault. This fault can be
enabled or disabled.
•Usage Fault: A usage fault is an exception that occurs because of a fault related to instruction
execution, such as:
– An undefined instruction
– An illegal unaligned access
– Invalid state on instruction execution
– An error on exception return. An unaligned address on a word or halfword memory access or
division by zero can cause a usage fault when the core is properly configured.
•SVCall: A supervisor call (SVC) is an exception that is triggered by the SVC instruction. In an OS
environment, applications can use SVC instructions to access OS kernel functions and device drivers.
•Debug Monitor: This exception is caused by the debug monitor (when not halting). This exception is
only active when enabled. This exception does not activate if it is a lower priority than the current
activation.
•PendSV: PendSV is a pendable, interrupt-driven request for system-level service. In an OS
environment, use PendSV for context switching when no other exception is active. PendSV is triggered
using the Interrupt Control and State (INTCTRL) register.
•SysTick: A SysTick exception is an exception that the system timer generates when it reaches zero
when enabled to generate an interrupt. Software can also generate a SysTick exception using the
Interrupt Control and State (INTCTRL) register. In an OS environment, the processor can use this
exception as system tick.
•Interrupt (IRQ): An interrupt, or IRQ, is an exception signaled by a peripheral or generated by a
software request and fed through the NVIC (prioritized). All interrupts are asynchronous to instruction
execution. In the system, peripherals use interrupts to communicate with the processor. Table 2-5 lists
the interrupts on the CC3200 application processor
For an asynchronous exception, other than reset, the processor can execute another instruction between
when the exception is triggered and when the processor enters the exception handler.
Privileged software can disable the exceptions that Table 2-6 show as having configurable priority (see the
SYSHNDCTRL register and the DIS0 register).
For more information about hard faults, memory management faults, bus faults, and usage faults, see
•Interrupt service routines (ISRs): Interrupts (IRQx) are the exceptions handled by ISRs.
•Fault handlers: Hard fault, memory-management fault, usage fault, and bus fault are fault exceptions
handled by the fault handlers.
•System handlers: NMI, PendSV, SVCall, SysTick, and the fault exceptions are all system exceptions
handled by system handlers.
2.2.4.4Vector Table
The vector table contains the reset value of the stack pointer and the start addresses, also called
exception vectors, for all exception handlers. The vector table is constructed using the vector address or
offset shown in Table 2-6. Figure 2-5 shows the order of the exception vectors in the vector table. The
least-significant bit of each vector must be 1, indicating that the exception handler is thumb code.
On system reset, the vector table is fixed at address 0x0000 0000. Privileged software can write to the
Vector Table Offset (VTABLE) register to relocate the vector table start address to a different memory
location, in the range 0x0000 0400 to 0x3FFF FC00. When configuring the VTABLE register, the offset
must be aligned on a 1024-byte boundary.
As shown in Table 2-6, all exceptions have an associated priority, with a lower priority value indicating a
higher priority and configurable priorities for all exceptions except reset, hard fault, and NMI. If software
does not configure any priorities, then all exceptions with a configurable priority have a priority of 0.
NOTE: Configurable priority values for the CC3200 implementation are in the range 0-7. This means
that the reset, hard fault, and NMI exceptions (NMI is reserved for use by the system) with
fixed negative priority values always have higher priority than any other exception.
For example, assigning a higher priority value to IRQ[0] and a lower priority value to IRQ[1] means that
IRQ[1] has higher priority than IRQ[0]. If both IRQ[1] and IRQ[0] are asserted, IRQ[1] is processed before
IRQ[0].
If multiple pending exceptions have the same priority, the pending exception with the lowest exception
number takes precedence. For example, if both IRQ[0] and IRQ[1] are pending and have the same
priority, then IRQ[0] is processed before IRQ[1].
When the processor is executing an exception handler, the exception handler is preempted if a higher
priority exception occurs. If an exception occurs with the same priority as the exception being handled, the
handler is not preempted, irrespective of the exception number. However, the status of the new interrupt
changes to pending.
2.2.4.6Interrupt Priority Grouping
To increase priority control in systems with interrupts, the NVIC supports priority grouping. This grouping
divides each interrupt priority register entry into two fields:
•An upper field that defines the group priority
•A lower field that defines a subpriority within the group
Only the group priority determines preemption of interrupt exceptions. When the processor is executing an
interrupt exception handler, another interrupt with the same group priority as the interrupt being handled
does not preempt the handler.
If multiple pending interrupts have the same group priority, the subpriority field determines the order in
which they are processed. If multiple pending interrupts have the same group priority and subpriority, the
interrupt with the lowest IRQ number is processed first.
2.2.4.7Exception Entry and Return
Descriptions of exception handling use the following terms:
•Preemption: When the processor is executing an exception handler, an exception can preempt the
exception handler if its priority is higher than the priority of the exception being handled. See
Section 2.2.4.6 for more information about preemption by an interrupt. When one exception preempts
another, the exceptions are called nested exceptions.
•Return: Return occurs when the exception handler is completed, there is no pending exception with
sufficient priority to be serviced, and the completed exception handler was not handling a late-arriving
exception. The processor pops the stack and restores the processor state to the state it had before the
interrupt occurred.
•Tail-chaining: This mechanism speeds up exception servicing. On completion of an exception handler,
if there is a pending exception that meets the requirements for exception entry, the stack pop is
skipped and control transfers to the new exception handler.
•Late-arriving: This mechanism speeds up preemption. If a higher priority exception occurs during state
saving for a previous exception, the processor switches to handle the higher priority exception and
initiates the vector fetch for that exception. State-saving is not affected by late arrival because the state
saved is the same for both exceptions. Therefore, the state-saving continues uninterrupted. The
processor can accept a late-arriving exception until the first instruction of the exception handler of the
original exception enters the execute stage of the processor. On return from the exception handler of
the late-arriving exception, the normal tail-chaining rules apply.
Functional Description
2.2.4.7.1 Exception Entry
Exception entry occurs when there is a pending exception with sufficient priority and either the processor
is in thread mode or the new exception is of higher priority than the exception being handled, in which
case the new exception preempts the original exception. When one exception preempts another, the
exceptions are nested.
Sufficient priority means the exception has more priority than any limits set by the mask registers (see
PRIMASK FAULTMASK, and BASEPRI registers). An exception with less priority than this is pending but
is not handled by the processor. When the processor takes an exception, unless the exception is a tailchained or a late-arriving exception, the processor pushes information onto the current stack. This
operation is referred to as stacking, and the structure of eight data words is referred to as stack frame.
Figure 2-6 shows the Cortex-M4 stack frame layout, which is similar to that of ARMv7-M implementations
Immediately after stacking, the stack pointer indicates the lowest address in the stack frame.
The stack frame includes the return address, which is the address of the next instruction in the interrupted
program. This value is restored to the PC at exception return so that the interrupted program resumes.
In parallel with the stacking operation, the processor performs a vector fetch that reads the exception
handler start address from the vector table. When stacking is complete, the processor starts executing the
exception handler. At the same time, the processor writes an EXC_RETURN value to the LR, indicating
which stack pointer corresponds to the stack frame and what operation mode the processor was in before
the entry occurred.
If no higher-priority exception occurs during exception entry, the processor starts executing the exception
handler and automatically changes the status of the corresponding pending interrupt to active.
If another higher-priority exception occurs during exception entry, known as late arrival, the processor
starts executing the exception handler for this exception and does not change the pending status of the
earlier exception
www.ti.com
Figure 2-6. Exception Stack Frame
2.2.5 Fault Handling
Faults are a subset of the exceptions (see Section 2.2.4). The following conditions generate a fault:
•A bus error on an instruction fetch, vector table load, or a data access.
•An internally detected error, such as an undefined instruction or an attempt to change state with a BX
instruction.
•Attempting to execute an instruction from a memory region marked as non-executable (XN).
2.2.5.1Fault Types
Table 2-8 shows the types of fault, the handler used for the fault, the corresponding fault status register,
and the register bit that indicates the fault has occurred.
FaultHandlerFault Status RegisterBit Name
Bus error on a vector readHard faultHard Fault Status
Fault escalated to a hard faultHard faultHard Fault Status
Undefined instructionUsage faultUsage Fault Status
Attempt to enter an invalid
instruction set state
Invalid EXC_RETURN valueUsage faultUsage Fault Status
Illegal unaligned load or storeUsage faultUsage Fault Status
Divide by 0Usage faultUsage Fault Status
Attempting to use an instruction set other than the Thumb instruction set, or returning to a non load-store-multiple instruction with
ICI continuation
(2)
Memory management faultMemory Management Fault
Status (MFAULTSTAT)
Bus faultBus Fault Status
(BFAULTSTAT)
Bus faultBus Fault Status
(BFAULTSTAT)
Bus faultBus Fault Status
(BFAULTSTAT)
(BFAULTSTAT)
(BFAULTSTAT)
Usage faultUsage Fault Status
(UFAULTSTAT)
(UFAULTSTAT)
Usage faultUsage Fault Status
(UFAULTSTAT)
(UFAULTSTAT)
(UFAULTSTAT)
(UFAULTSTAT)
MUSTKE
BSTKE
BUSTKE
IBUS
PRECISE
IMPRE
NOCP
UNDEF
INVSTAT
INVPC
UNALIGN
DIV0
2.2.5.2Fault Escalation and Hard Faults
All fault exceptions except for hard fault have configurable exception priority (see SYSPRI1 in
Section 3.3.1.17). Software can disable execution of the handlers for these faults (see SYSHNDCTRL).
Usually the exception priority, together with the values of the exception mask registers, determines
whether the processor enters the fault handler, and whether a fault handler can preempt another fault
handler as described in Section 2.2.4.
In some situations, a fault with configurable priority is treated as a hard fault. This process is called priority
escalation, and the fault is described as escalated to hard fault. Escalation to hard fault occurs when:
•A fault handler causes the same kind of fault as the one it is servicing. This escalation to hard fault
occurs because a fault handler cannot preempt itself, as it must have the same priority as the current
priority level.
•A fault handler causes a fault with the same or lower priority as the fault it is servicing. This situation
happens because the handler for the new fault cannot preempt the currently executing fault handler.
•An exception handler causes a fault for which the priority is the same as or lower than the currently
executing exception.
•A fault occurs and the handler for that fault is not enabled.
If a bus fault occurs during a stack push when entering a bus fault handler, the bus fault does not escalate
to a hard fault. Thus, if a corrupted stack causes a fault, the fault handler executes even though the stack
push for the handler failed. The fault handler operates but the stack contents are corrupted.
NOTE: Only reset and NMI can preempt the fixed-priority hard fault. A hard fault can preempt any
exception other than reset, NMI, or another hard fault.
2.2.5.3Fault Status Registers and Fault Address Registers
The fault status registers indicate the cause of a fault. For bus faults and memory management faults, the
fault address register indicates the address accessed by the operation that caused the fault, as shown in
Table 2-9.
Table 2-9. Fault Status and Fault Address Registers
HandlerStatus Register NameAddress Register NameRegister Description
Hard faultHard Fault Status
(HFAULTSTAT)
Memory management faultMemory Management Fault
Status (MFAULTSTAT)
Bus faultBus Fault Status
(BFAULTSTAT)
Usage faultUsage Fault Status
(UFAULTSTAT)
-Section 3.3.1.22
Memory Management Fault
Address (MMADDR)
Bus Fault Address
(FAULTADDR)
-Section 3.3.1.23
2.2.5.4Lockup
The processor enters a lockup state if a hard fault occurs when executing the NMI or hard fault handlers.
When the processor is in the lockup state, it does not execute any instructions. The processor remains in
lockup state until it is reset, an NMI occurs, or it is halted by a debugger.
2.2.6 Power Management
The CC3200 Wi-Fi microcontroller is a multi-processor system-on-chip. An advanced power management
scheme has been implemented at chip level that delivers the best-in-class energy efficiency across a wide
class of application profiles, while handling the asynchronous sleep-wake requirements of multiple high
performance processors and Wi-Fi radio subsystems. The Cortex-M4 application processor subsystem
(consisting of the CM4 core and application peripherals) is a subset of this.
The chip-level power management scheme is such that the application program is unaware of the power
state transitions of the other subsystems. This approach insulates the user from the complexities of a
multi-processor system and simplifies the application development process.
From the Cortex-M4 application processor standpoint, CC3200 supports the typical SLEEP and
DEEPSLEEP modes similar to those in discrete microcontrollers. The following section describe these two
modes.
In addition to SLEEP and DEEPSLEEP, two additional sleep modes are offered. These two modes
consume much lower power than the DEEPSLEEP mode in CC3200.
•Low Power Deep Sleep Mode (LPDS)
– Recommended for ultra-low power always-connected cloud and Wi-Fi applications
– Up to 256Kbyte of SRAM retention and fast wakeup (<5 mS)
– When networking and Wi-Fi subsystems are disabled, the MCU draws less than 100 µA with
256Kbyte of SRAM retained (code and data). Total system current (incl Wi-Fi and network periodic
wake-up) as low as 700 µA
– Processor and peripheral registers are not retained. Global always ON configurations at SoC level
are retained.
•Hibernate Mode (HIB)
– Recommended for ultra-low power in-frequently connected cloud and Wi-Fi applications
– Ultra low current of 4 µA, including RTC
– Wake on RTC or selected GPIO
– No SRAM or logic retention. 2 × 32 bit register retention.
LPDS and HIB modes will be covered in more detail in the Power Clock and Reset Management chapter.
Figure 2-7 shows the architecture of the CC3200 SoC level power management, especially from the
application point of view.
Functional Description
Figure 2-7. Power Management Architecture in CC3200 SoC
The Cortex-M4 processor implementation inside the CC3200 multiprocessor SoC has a few differences
when compared to a discrete MCU. While typical SLEEP and DEEPSLEEP modes are supported, in the
CC3200 these two modes are limited in energy consumption savings.
Ultra-low power applications should be architected such that time spent in LPDS or hibernate mode is
maximized. The Cortex-M4 application processor can be configured wake up on selected events, for
example network events such as an incoming data packet, timer, or I/O pad toggle. The time spent in
RUN (or ACTIVE) state should then be minimized. The dedicated Cortex-M4 application processor in
CC3200 is particularly suited for this mode of operation due to its advanced power management, DMA,
zero wait state multi-layer AHB interconnect, fast execution and retention over the entire range of zerowait state SRAM.
•SLEEP: Sleep mode stops the processor clock (clock gating).
•DEEPSLEEP: Deep-sleep mode stops the application process system clock and switches off the PLL.
2.2.7 Instruction Set Summary
The processor implements a version of the Thumb instruction set. Table 2-10 lists the supported
instructions.
Note: In this table:
•Angle brackets, < >, enclose alternative forms of the operand
•Braces, {} enclose optional operands
•The Operands column is not exhaustive
•Op2 is a flexible second operand that can be either a register or a constant
•Most instructions can use an optional condition code suffix
For more information on the instructions and operands, see the instruction descriptions in the ARM®
Cortex™-M4 Technical Reference Manual.
www.ti.com
Table 2-10. Cortex-M4 Instruction Summary
MnemonicOperandsBrief DescriptionFlags
ADC, ADCS{Rd,} Rn, Op2Add with carryN,Z,C,V
ADD, ADDS{Rd,} Rn, Op2AddN,Z,C,V
ADD, ADDW{Rd,} Rn , #imm12AddADRRd, labelLoad PC-relative addressAND, ANDS{Rd,} Rn, Op2Logical ANDN,Z,C
ASR, ASRSRd, Rm, <Rs|#n>Arithmetic shift rightN,Z,C
BlabelBranchBFCRd, #lsb, #widthBit field clearBFIRd, Rn, #lsb, #widthBit field insertBIC, BICS{Rd,} Rn, Op2Bit clearN,Z,C
BKPT#immBreakpointBLlabelBranch with linkBLXRmBranch indirect with linkBXRmBranch indirectCBNZRn, labelCompare and branch if non-
zero
CBZRn, labelCompare and branch if zeroCLREX-Clear exclusiveCLZRd, RmCount leading zerosCMNRn, Op2Compare negativeN,Z,C,V
CMPRn, Op2CompareN,Z,C,V
CPSIDiChange processor state,
increment after
LDMDB, LDMEARn{!}, reglistLoad multiple registers,
decrement before
LDMFD, LDMIARn{!}, reglistLoad multiple registers,
increment after
LDRRt, [Rn, #offset]Load register with wordLDRB, LDRBTRt, [Rn, #offset]Load register with byteLDRDRt, Rt2, [Rn, #offset]Load register with two bytesLDREXRt, [Rn, #offset]Load register exclusiveLDREXBRt, [Rn]Load register exclusive with
byte
LDREXHRt, [Rn]Load register exclusive with
halfword
LDRH, LDRHTRt, [Rn, #offset]Load register with halfwordLDRSB, LDRSBTRt, [Rn, #offset]Load register with signed byteLDRSH, LDRSHTRt, [Rn, #offset]Load register with signed
QSUB{Rd,} Rn, RmSaturating subtractQ
QSUB16{Rd,} Rn, RmSaturating subtract 16QSUB8{Rd,} Rn, RmSaturating subtract 8RBITRd, RnReverse bitsREVRd, RnReverse byte order in a wordREV16Rd, RnReverse byte order in each
REVSHRd, RnReverse byte order in bottom
ROR, RORSRd, Rm, <Rs|#n>Rotate rightN,Z,C
RRX, RRXSRd, RmRotate right with extendN,Z,C
RSB, RSBS{Rd,} Rn, Op2Reverse subtractN,Z,C,V
SADD16{Rd,} Rn, RmSigned add 16GE
SADD8{Rd,} Rn, RmSigned add 8GE
SASX{Rd,} Rn, RmSigned add and subtract with
SBC, SBCS{Rd,} Rn, Op2Subtract with carryN,Z,C,V
SBFXRd, Rn, #lsb, #widthSigned bit field extractSDIV{Rd,} Rn, RmSigned divideSEL{Rd,} Rn, RmSelect bytesSEV-Send eventSHADD16{Rd,} Rn, RmSigned halving add 16SHADD8{Rd,} Rn, RmSigned halving add 8SHASX{Rd,} Rn, RmSigned halving add and
This chapter provides information on the CC3200 implementation of the Cortex-M4 application processor
in CC3200 peripherals, including:
•SysTick (see Section 3.2.1) – Provides a simple, 24-bit clear-on-write, decrementing, wrap-on-zero
counter with a flexible control mechanism.
•Nested Vectored Interrupt Controller (NVIC) (see Section 3.2.2) – Facilitates low-latency exception and
interrupt handling, controls power management, and implements system control registers.
•System Control Block (SCB) (see Section 3.2.3) – Provides system implementation information and
system control, including configuration, control, and reporting of system exceptions.
Table 3-1 shows the address map of the private peripheral bus (PPB). Some peripheral register regions
are split into two address regions, as indicated by two addresses listed.
This chapter provides information on the CC3200 implementation of the Cortex-M4 application processor
in CC3200 peripherals: SysTick, NVIC, and SCB.
3.2.1 System Timer (SysTick)
SysTick is an integrated system timer which provides a simple, 24-bit clear-on-write, decrementing, wrapon-zero counter with a flexible control mechanism. The counter can be used in several different ways:
•An RTOS tick timer that fires at a programmable rate (for example, 100 Hz) and invokes a SysTick
routine.
•A high-speed alarm timer using the system clock.
•A variable rate alarm or signal timer – The duration is range-dependent on the reference clock used
and the dynamic range of the counter.
•A simple counter measuring time to completion and time used.
•An internal clock source control based on missing or meeting durations. The COUNT bit in the
STCTRL control and status register can be used to determine if an action completed within a set
duration, as part of a dynamic clock management control loop.
When enabled, the timer counts down on each clock from the reload value to zero, reloads (wraps) to the
value in the STRELOAD register on the next clock edge, then decrements on subsequent clocks. Clearing
the STRELOAD register disables the counter on the next wrap. When the counter reaches zero, the
COUNT status bit is set. The COUNT bit clears on reads.
Writing to the STCURRENT register clears the register and the COUNT status bit. The write does not
trigger the SysTick exception logic. On a read, the current value is the value of the register at the time the
register is accessed.
The SysTick counter runs on the system clock. If this clock signal is stopped for low power mode, the
SysTick counter stops. Ensure software uses aligned word accesses to access the SysTick registers.
The SysTick counter reload and current value are undefined at reset; the correct initialization sequence for
the SysTick counter is:
1. Program the value in the STRELOAD register.
2. Clear the STCURRENT register by writing to it with any value.
3. Configure the STCTRL register for the required operation.
NOTE: When the processor is halted for debugging, the counter does not decrement.
3.2.2Nested Vectored Interrupt Controller (NVIC)
This section describes the nested vectored interrupt controller (NVIC) and the registers it uses. The NVIC
supports:
•A programmable priority level of 0-7 for each interrupt. A higher level corresponds to a lower priority,
so level 0 is the highest interrupt priority.
•Low-latency exception and interrupt handling
•Level and pulse detection of interrupt signals
•Dynamic reprioritization of interrupts
•Grouping of priority values into group priority and subpriority fields
•Interrupt tail-chaining
•An external non-maskable interrupt (NMI)
The processor automatically stacks its state on exception entry and unstacks this state on exception exit,
with no instruction overhead, providing low latency exception handling.
3.2.2.1Level-Sensitive and Pulse Interrupts
The processor supports both level-sensitive and pulse interrupts. Pulse interrupts are also described as
edge-triggered interrupts.
A level-sensitive interrupt is held asserted until the peripheral deasserts the interrupt signal. Typically this
happens because the ISR accesses the peripheral, causing it to clear the interrupt request. A pulse
interrupt is an interrupt signal sampled synchronously on the rising edge of the processor clock. To ensure
the NVIC detects the interrupt, the peripheral must assert the interrupt signal for at least one clock cycle,
during which the NVIC detects the pulse and latches the interrupt.
When the processor enters the ISR, it automatically removes the pending state from the interrupt (see
Section 3.2.2.2 for more information). For a level-sensitive interrupt, if the signal is not deasserted before
the processor returns from the ISR, the interrupt becomes pending again, and the processor must execute
its ISR again. As a result, the peripheral can hold the interrupt signal asserted until it no longer needs
servicing.
Functional Description
3.2.2.2Hardware and Software Control of Interrupts
The Cortex-M4 latches all interrupts. A peripheral interrupt becomes pending for one of the following
reasons:
•The NVIC detects that the interrupt signal is High and the interrupt is not active.
•The NVIC detects a rising edge on the interrupt signal.
•Software writes to the corresponding interrupt set-pending register bit, or to the Software Trigger
Interrupt (SWTRIG) register to make a software-generated interrupt pending. See the INT bit in the
PEND0 register or SWTRIG register.
A pending interrupt remains pending until one of the following:
•The processor enters the ISR for the interrupt, changing the state of the interrupt from pending to
active. Then:
– For a level-sensitive interrupt, when the processor returns from the ISR, the NVIC samples the
interrupt signal. If the signal is asserted, the state of the interrupt changes to pending, which might
cause the processor to immediately re-enter the ISR. Otherwise, the state of the interrupt changes
to inactive.
– For a pulse interrupt, the NVIC continues to monitor the interrupt signal, and if this is pulsed, the
state of the interrupt changes to pending and active. In this case, when the processor returns from
the ISR the state of the interrupt changes to pending, which might cause the processor to
immediately re-enter the ISR.
If the interrupt signal is not pulsed while the processor is in the ISR, when the processor returns
from the ISR the state of the interrupt changes to inactive.
•Software writes to the corresponding interrupt clear-pending register bit
– For a level-sensitive interrupt, if the interrupt signal is still asserted, the state of the interrupt does
not change. Otherwise, the state of the interrupt changes to inactive.
– For a pulse interrupt, the state of the interrupt changes to inactive, if the state was pending or to
active, if the state was active and pending.
3.2.3 System Control Block (SCB)
The system control block (SCB) provides system implementation information and system control, including
configuration, control, and reporting of the system exceptions.
3.3Register Map
Table 3-2 lists the Cortex-M4 Peripheral SysTick, NVIC, and SCB registers. The offset listed is a
hexadecimal increment to the address of the register, relative to the core peripherals base address of
0xE000 E000.
NOTE: Register spaces that are not used are reserved for future or internal use. Software should
not modify any reserved memory address.
www.ti.com
Table 3-2. Peripherals Register Map
OffsetNameTypeResetDescription
System Timer (SysTick) Registers
Pending
0x300ACTIVE0RO0x0000.0000Interrupt 0-31 Active Bit
0x304ACTIVE1RO0x0000.0000Interrupt 32-63 Active Bit
0x308ACTIVE2RO0x0000.0000Interrupt 64-95 Active Bit
0x30CACTIVE3RO0x0000.0000Interrupt 96-127 Active
Bit
0x310ACTIVE4RO0x0000.0000Interrupt 128-159 Active
Bit
0x314ACTIVE5RO0x0000.0000Interrupt 160-191 Active
Bit
0x318ACTIVE6RO0x0000.0000Interrupt 192-199 Active
Table 3-3 lists the memory-mapped registers for the PERIPHERAL. All register offset addresses not listed
in Table 3-3 should be considered as reserved locations and the register contents should not be modified.
The offset listed is a hexadecimal increment to the register's address, relative to the Core Peripherals
base address of 0xE000.E000.
Note: Register spaces that are not used are reserved for future or internal use. Software should not
modify any reserved memory address.
OffsetAcronymRegister NameSection
8hACTLRAuxiliary ControlSection 3.3.1.1
10hSTCTRLSysTick Control and Status RegisterSection 3.3.1.2
14hSTRELOADSysTick Reload Value RegisterSection 3.3.1.3
18hSTCURRENTSysTick Current Value RegisterSection 3.3.1.4
100h to
118h
180h to
198h
200h to
218h
280h to
298h
300h to
318h
400h to
4C4h
D00hCPUIDCPU ID BaseSection 3.3.1.11
D04hINTCTRLInterrupt Control and StateSection 3.3.1.12
D08hVTABLEVector Table OffsetSection 3.3.1.13
D0ChAPINTApplication Interrupt and Reset ControlSection 3.3.1.14
ACTLR is shown in Figure 3-1 and described in Table 3-4.
NOTE: his register can only be accessed from privileged mode. The ACTLR register provides disable bits
for IT folding, write buffer use for accesses to the default memory map, and interruption of multi-cycle
instructions. By default, this register is set to provide optimum performance from the Cortex-M4 application
processor in CC3200 and does not normally require modification.
Figure 3-1. ACTLR Register
3130292827262524
RESERVED
R-0h
2322212019181716
RESERVED
R-0h
15141312111098
RESERVEDDISOOFPDISFPCA
R-0hR/W-0hR/W-0h
76543210
RESERVEDDISFOLDDISWBUFDISMCYC
R-0hR/W-0hR/W-0hR/W-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Register Map
Table 3-4. ACTLR Register Field Descriptions
BitFieldTypeResetDescription
31-10RESERVEDR0h
9DISOOFPR/W0hDisable Out-Of-Order Floating Point.
8DISFPCAR/W0h
7-3RESERVEDR0h
2DISFOLDR/W0hDisable IT Folding In some situations, the processor can start
1DISWBUFR/W0hDisable IT Folding In some situations, the processor can start
0DISMCYCR/W0hDisable Interrupts of Multiple Cycle Instructions In this situation, the
N/A for CC3200.
executing the first instruction in an IT block while it is still executing
the IT instruction.
This behavior is called IT folding, and improves performance,
However, IT folding can cause jitter in looping.
If a task must avoid jitter, set the DISFOLD bit before executing the
task, to disable IT folding.
0h = No effect.
1h = Disables IT folding.
executing the first instruction in an IT block while it is still executing
the IT instruction.
This behavior is called IT folding, and improves performance,
However, IT folding can cause jitter in looping.
If a task must avoid jitter, set the DISFOLD bit before executing the
task, to disable IT folding.
0h = No effect.
1h = Disables IT folding.
interrupt latency of the processor is increased because any LDM or
STM must complete before the processor can stack the current state
and enter the interrupt handler.
0h = No effect.
1h = Disables interruption of load multiple and store multiple
STCTRL is shown in Figure 3-2 and described in Table 3-5.
NOTE: This register can only be accessed from privileged mode. The SysTick STCTRL register enables
the SysTick features.
Figure 3-2. STCTRL Register
3130292827262524
RESERVED
R-0h
2322212019181716
RESERVEDCOUNT
R-0hR-0h
15141312111098
RESERVED
R-0h
76543210
RESERVEDCLK_SRCINTENENABLE
R-0hR/W-0hR/W-0hR/W-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
www.ti.com
Table 3-5. STCTRL Register Field Descriptions
BitFieldTypeResetDescription
31-17RESERVEDR0h
16COUNTR0hCount Flag This bit is cleared by a read of the register or if the
15-3RESERVEDR0h
2CLK_SRCR/W0h
1INTENR/W0h
0ENABLER/W0h
STCURRENT register is written with any value.
If read by the debugger using the DAP, this bit is cleared only if the
MasterType bit in the AHB-AP Control Register is clear.
Otherwise, the COUNT bit is not changed by the debugger read.
See the ARM Debug Interface V5 Architecture Specification for more
information on MasterType.
0h = The SysTick timer has not counted to 0 since the last time this
bit was read.
1h = The SysTick timer has counted to 0 since the last time this bit
was read.
Clock Source
0h = Precision internal oscillator (PIOSC) divided by 4
1h = System clock
Interrupt Enable
0h = Interrupt generation is disabled. Software can use the COUNT
bit to determine if the counter has ever reached 0.
1h = An interrupt is generated to the NVIC when SysTick counts to
0.
Enable
0h = The counter is disabled.
1h = Enables SysTick to operate in a multi-shot way. That is, the
counter loads the RELOAD value and begins counting down. On
reaching 0, the COUNT bit is set and an interrupt is generated if
enabled by INTEN. The counter then loads the RELOAD value again
and begins counting.
STRELOAD is shown in Figure 3-3 and described in Table 3-6.
NOTE: This register can only be accessed from privileged mode. The STRELOAD register specifies the
start value to load into the SysTick Current Value (STCURRENT) register when the counter reaches 0.
The start value can be between 0x1 and 0x00FF.FFFF. A start value of 0 is possible but has no effect
because the SysTick interrupt and the COUNT bit are activated when counting from 1 to 0. SysTick can
be configured as a multi-shot timer, repeated over and over, firing every N+1 clock pulses, where N is any
value from 1 to 0x00FF.FFFF. For example, if a tick interrupt is required every 100 clock pulses, 99 must
be written into the RELOAD field. Note that in order to access this register correctly, the system clock
must be faster than 8 MHz.
STCURRENT is shown in Figure 3-4 and described in Table 3-7.
NOTE: This register can only be accessed from privileged mode. The STCURRENT register contains the
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-7. STCURRENT Register Field Descriptions
BitFieldTypeResetDescription
31-24RESERVEDR0h
23-0CURRENTR/WC0hCurrent Value This field contains the current value at the time the
register is accessed.
No read-modify-write protection is provided, so change with care.
This register is write-clear.
Writing to it with any value clears the register.
Clearing this register also clears the COUNT bit of the STCTRL
register.
3.3.1.5EN_0 to EN_6 Register (offset = 100h to 118h) [reset = 0h]
EN_0 to EN_6 is shown in Figure 3-5 and described in Table 3-8.
NOTE: This register can only be accessed from privileged mode. The ENn registers enable interrupts and
show which interrupts are enabled. Bit 0 of EN0 corresponds to Interrupt 0; bit 31 corresponds to Interrupt
31. Bit 0 of EN1 corresponds to Interrupt 32; bit 31 corresponds to Interrupt 63. Bit 0 of EN2 corresponds
to Interrupt 64; bit 31 corresponds to Interrupt 95. Bit 0 of EN3 corresponds to Interrupt 96; bit 31
corresponds to Interrupt 127. Bit 0 of EN4 corresponds to Interrupt 128; bit 31 corresponds to Interrupt
159. Bit 0 of EN5 corresponds to Interrupt 160; bit 31 corresponds to Interrupt 191. Bit 0 of EN6
corresponds to interrupt 192; bit 7 corresponds to interrupt 199. If a pending interrupt is enabled, the NVIC
activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal
changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority.
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-8. EN_0 to EN_6 Register Field Descriptions
BitFieldTypeResetDescription
31-0INTR/W0hInterrupt Enable A bit can only be cleared by setting the
corresponding INT[n] bit in the DISn register.
0h (W) = On a write, no effect.
0h (R) = On a read, indicates the interrupt is disabled.
1h (W) = On a write, enables the interrupt.
1h (R) = On a read, indicates the interrupt is enabled.
3.3.1.6DIS_0 to DIS_6 Register (offset = 180h to 198h) [reset = 0h]
DIS_0 to DIS_6 is shown in Figure 3-6 and described in Table 3-9.
NOTE: This register can only be accessed from privileged mode. The DISn registers disable interrupts. Bit
0 of DIS0 corresponds to Interrupt 0; bit 31 corresponds to Interrupt 31. Bit 0 of DIS1 corresponds to
Interrupt 32; bit 31 corresponds to Interrupt 63. Bit 0 of DIS2 corresponds to Interrupt 64; bit 31
corresponds to Interrupt 95. Bit 0 of DIS3 corresponds to Interrupt 96; bit 31 corresponds to Interrupt 127.
Bit 0 of DIS4 corresponds to Interrupt 128; bit 31 corresponds to Interrupt 159. Bit 0 of DIS5 corresponds
to Interrupt 160; bit 31 corresponds to Interrupt 191. Bit 0 of DIS6 corresponds to Interrupt 192; bit 7
corresponds to Interrupt 199.
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-9. DIS_0 to DIS_6 Register Field Descriptions
BitFieldTypeResetDescription
31-0INTR/W0h
Interrupt Disable EN5 (for DIS5) register EN6 (for DIS6) register
0h (R) = On a read, indicates the interrupt is disabled.
1h (W) = On a write, no effect.
1h (R) = On a read, indicates the interrupt is enabled.
3.3.1.7PEND_0 to PEND_6 Register (offset = 200h to 218h) [reset = 0h]
PEND_0 to PEND_6 is shown in Figure 3-7 and described in Table 3-10.
NOTE: This register can only be accessed from privileged mode. The PENDn registers force interrupts
into the pending state and show which interrupts are pending. Bit 0 of PEND0 corresponds to Interrupt 0;
bit 31 corresponds to Interrupt 31. Bit 0 of PEND1 corresponds to Interrupt 32; bit 31 corresponds to
Interrupt 63. Bit 0 of PEND2 corresponds to Interrupt 64; bit 31 corresponds to Interrupt 95. Bit 0 of
PEND3 corresponds to Interrupt 96; bit 31 corresponds to Interrupt 127. Bit 0 of PEND4 corresponds to
Interrupt 128; bit 31 corresponds to Interrupt 159. Bit 0 of PEND5 corresponds to Interrupt 160; bit 31
corresponds to Interrupt 191. Bit 0 of PEND6 corresponds to Interrupt 192; bit 7 corresponds to Interrupt
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-10. PEND_0 to PEND_6 Register Field Descriptions
BitFieldTypeResetDescription
31-0INTR/W0hInterrupt Set Pending If the corresponding interrupt is already
pending, setting a bit has no effect.
A bit can only be cleared by setting the corresponding INT[n] bit in
the UNPEND0 (for PEND0 to PEND3) register UNPEND4 (for
PEND4) register UNPEND5 (for PEND5) register UNPEND6 (for
PEND6) register
0h (W) = On a write, no effect.
0h (R) = On a read, indicates that the interrupt is not pending.
1h (W) = On a write, the corresponding interrupt is set to pending
even if it is disabled.
1h (R) = On a read, indicates that the interrupt is pending.
3.3.1.8UNPEND_0 to UNPEND_6 Register (offset = 280h to 298h) [reset = 0h]
UNPEND_0 to UNPEND_6 is shown in Figure 3-8 and described in Table 3-11.
NOTE: This register can only be accessed from privileged mode. The UNPENDn registers show which
interrupts are pending and remove the pending state from interrupts. Bit 0 of UNPEND0 corresponds to
Interrupt 0; bit 31 corresponds to Interrupt 31. Bit 0 of UNPEND1 corresponds to Interrupt 32; bit 31
corresponds to Interrupt 63. Bit 0 of UNPEND2 corresponds to Interrupt 64; bit 31 corresponds to Interrupt
95. Bit 0 of UNPEND3 corresponds to Interrupt 96; bit 31 corresponds to Interrupt 127. Bit 0 of UNPEND4
corresponds to Interrupt 128; bit 10 corresponds to Interrupt 159. Bit 0 of UNPEND5 corresponds to
Interrupt 160; bit 31 corresponds to interrupt 191. Bit 0 of UNPEND6 corresponds to Interrupt 192; bit 7
corresponds to Interrupt 199.
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-11. UNPEND_0 to UNPEND_6 Register Field Descriptions
BitFieldTypeResetDescription
31-0INTR/W0hInterrupt Clear Pending Setting a bit does not affect the active state
of the corresponding interrupt.
0h (W) = On a write, no effect.
0h (R) = On a read, indicates that the interrupt is not pending.
1h (W) = On a write, clears the corresponding INT[n] bit in the
PEND0 (for UNPEND0 to UNPEND3) register PEND4 (for
UNPEND4) register PEND5 (for UNPEND5) register PEND6 (for
UNPEND6) register so that interrupt [n] is no longer pending.
1h (R) = On a read, indicates that the interrupt is pending.
3.3.1.9ACTIVE_0 to ACTIVE_6 Register (offset = 300h to 318h) [reset = 0h]
ACTIVE_0 to ACTIVE_6 is shown in Figure 3-9 and described in Table 3-12.
The UNPENDn registers indicate which interrupts are active. Bit 0 of ACTIVE0 corresponds to Interrupt 0;
bit 31 corresponds to Interrupt 31. Bit 0 of ACTIVE1 corresponds to Interrupt 32; bit 31 corresponds to
Interrupt 63. Bit 0 of ACTIVE2 corresponds to Interrupt 64; bit 31 corresponds to Interrupt 95. Bit 0 of
ACTIVE3 corresponds to Interrupt 96; bit 31 corresponds to Interrupt 127. Bit 0 of ACTIVE4 corresponds
to Interrupt 128; bit 31 corresponds to Interrupt 159. Bit 0 of ACTIVE5 corresponds to Interrupt 160; bit 31
corresponds to Interrupt 191. Bit 0 of ACTIVE6 corresponds to Interrupt 192; bit 7 corresponds to Interrupt
199. CAUTION: Do not manually set or clear the bits in this register.
3.3.1.10 PRI_0 to PRI_49 Register (offset = 400h to 4C4h) [reset = 0h]
PRI_0 to PRI_49 is shown in Figure 3-10 and described in Table 3-13.
NOTE: This register can only be accessed from privileged mode. The PRIn registers provide 3-bit priority
fields for each interrupt. These registers are byte accessible. Each register holds four priority fields that
are assigned to interrupts as follows: bits 31 to 29 have interrupt [4n+3], bits 23 to 21 have interrupt
[4n+2], bits 15 to 13 have interrupt [4n+1], and bits 7 to have interrupt [4n]. Each priority level can be split
into separate group priority and subpriority fields. The PRIGROUP field in the Application Interrupt and
Reset Control (APINT) register indicates the position of the binary point that splits the priority and
subpriority fields. These registers can only be accessed from privileged mode.
Figure 3-10. PRI_0 to PRI_49 Register
31302928272625242322212019181716
INTDRESERVEDINTCRESERVED
R/W-0hR-0hR/W-0hR-0h
1514131211109876543210
INTBRESERVEDINTARESERVED
R/W-0hR-0hR/W-0hR-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-13. PRI_0 to PRI_49 Register Field Descriptions
BitFieldTypeResetDescription
31-29INTDR/W0hInterrupt Priority for Interrupt [4n+3] This field holds a priority value,
28-24RESERVEDR0h
23-21INTCR/W0hInterrupt Priority for Interrupt [4n+2] This field holds a priority value,
20-16RESERVEDR0h
15-13INTBR/W0hInterrupt Priority for Interrupt [4n+1] This field holds a priority value,
12-8RESERVEDR0h
7-5INTAR/W0hInterrupt Priority for Interrupt [4n] This field holds a priority value,
4-0RESERVEDR0h
0-7, for the interrupt with the number [4n+3], where n is the number
of the Interrupt Priority register (n=0 for PRI0, and so on).
The lower the value, the greater the priority of the corresponding
interrupt.
0-7, for the interrupt with the number [4n+2], where n is the number
of the Interrupt Priority register (n=0 for PRI0, and so on).
The lower the value, the greater the priority of the corresponding
interrupt.
0-7, for the interrupt with the number [4n+1], where n is the number
of the Interrupt Priority register (n=0 for PRI0, and so on).
The lower the value, the greater the priority of the corresponding
interrupt.
0-7, for the interrupt with the number [4n], where n is the number of
the Interrupt Priority register (n=0 for PRI0, and so on).
The lower the value, the greater the priority of the corresponding
interrupt.
CPUID is shown in Figure 3-11 and described in Table 3-14.
NOTE: his register can only be accessed from privileged mode. The CPUID register contains the ARM
Cortex -M4 processor part number, version, and implementation information.
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-15. INTCTRL Register Field Descriptions
BitFieldTypeResetDescription
31NMISETR/W0hNMI Set Pending Because NMI is the highest-priority exception,
normally the processor enters the NMI exception handler as soon as
it registers the setting of this bit, and clears this bit on entering the
interrupt handler.
A read of this bit by the NMI exception handler returns 1 only if the
NMI signal is reasserted while the processor is executing that
handler.
0h (W) = On a write, no effect.
0h (R) = On a read, indicates an NMI exception is not pending.
1h (W) = On a write, changes the NMI exception state to pending.
1h (R) = On a read, indicates an NMI exception is pending.
30-29RESERVEDR0h
28PENDSVR/W0hPendSV Set Pending Setting this bit is the only way to set the
PendSV exception state to pending.
This bit is cleared by writing a 1 to the UNPENDSV bit.
0h (W) = On a write, no effect.
0h (R) = On a read, indicates a PendSV exception is not pending.
1h (W) = On a write, changes the PendSV exception state to
pending.
1h (R) = On a read, indicates a PendSV exception is pending.
27UNPENDSVW0hPendSV Clear Pending This bit is write only
on a register read, its value is unknown.
0h = On a write, no effect.
1h = On a write, removes the pending state from the PendSV
exception.
26PENDSTSETR/W0hSysTick Set Pending This bit is cleared by writing a 1 to the
PENDSTCLR bit.
0h (W) = On a write, no effect.
0h (R) = On a read, indicates a SysTick exception is not pending.
1h (W) = On a write, changes the SysTick exception state to
pending.
1h (R) = On a read, indicates a SysTick exception is pending.
Table 3-15. INTCTRL Register Field Descriptions (continued)
BitFieldTypeResetDescription
25PENDSTCLRW0hSysTick Clear Pending This bit is write only
24RESERVEDR0h
23ISRPRER0hDebug Interrupt Handling This bit is only meaningful in Debug mode
22ISRPENDR0hInterrupt Pending This bit provides status for all interrupts excluding
21-20RESERVEDR0h
19-12VECPENDR0hInterrupt Pending Vector Number This field contains the exception
11RETBASER0hReturn to Base This bit provides status for all interrupts excluding
10-8RESERVEDR0h
7-0VECACTR0hInterrupt Pending Vector Number This field contains the active
on a register read, its value is unknown.
0h = On a write, no effect.
1h = On a write, removes the pending state from the SysTick
exception.
and reads as zero when the processor is not in Debug mode.
0h = The release from halt does not take an interrupt.
1h = The release from halt takes an interrupt.
NMI and Faults.
0h = No interrupt is pending.
1h = An interrupt is pending.
number of the highest priority pending enabled exception.
The value indicated by this field includes the effect of the BASEPRI
and FAULTMASK registers, but not any effect of the PRIMASK
register.
7h- Ah = Reserved ...
NMI and Faults.
This bit only has meaning if the processor is currently executing an
ISR (the Interrupt Program Status (IPSR) register is non-zero).
0h = There are preempted active exceptions to execute.
1h = There are no active exceptions, or the currently executing
exception is the only active exception.
exception number.
The exception numbers can be found in the description for the
VECPEND field.
If this field is clear, the processor is in Thread mode.
This field contains the same value as the ISRNUM field in the IPSR
register.
Subtract 16 from this value to obtain the IRQ number required to
index into the Interrupt Set Enable (ENn), Interrupt Clear Enable
(DISn), Interrupt Set Pending (PENDn), Interrupt Clear Pending
(UNPENDn), and Interrupt Priority (PRIn) registers.
VTABLE is shown in Figure 3-13 and described in Table 3-16.
NOTE: his register can only be accessed from privileged mode. The VTABLE register indicates the offset
of the vector table base address from memory address 0x0000.0000.
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-16. VTABLE Register Field Descriptions
BitFieldTypeResetDescription
31-10OFFSETR/W0hVector Table Offset When configuring the OFFSET field, the offset
9-0RESERVEDR0h
must be aligned to the number of exception entries in the vector
table.
Because there are 199 interrupts, the offset must be aligned on a
1024-byte boundary.
APINT is shown in Figure 3-14 and described in Table 3-17.
NOTE: his register can only be accessed from privileged mode. The APINT register provides priority
grouping control for the exception model, endian status for data accesses, and reset control of the system.
To write to this register, 0x05FA must be written to the VECTKEY field, otherwise the write is ignored. The
PRIGROUP field indicates the position of the binary point that splits the INTx fields in the Interrupt Priority
(PRIx) registers into separate group priority and subpriority fields. The bit numbers in the Group Priority
Field and Subpriority Field columns in the table refer to the bits in the INTA field. For the INTB field, the
corresponding bits are 15:13; for INTC, 23:21; and for INTD, 31:29. NOTE: Determining preemption of an
exception uses only the group priority field. PRIGROUP Bit Field = Binary Point = Group Priority Field =
Subpriority Field = Group Priorities = Subpriorities 0h-4h = bxxx = [7:5] = None = 8 = 1 5h = bxx.y = [7:6] =
[5] = 4 = 2 6h = bx.yy = [7] = [6:5] = 2 = 4 7h = b.yyy = None = [7:5] = 1 = 8 INTx field showing the binary
point. An x denotes a group priority field bit, and a y denotes a subpriority field bit.
Figure 3-14. APINT Register
3130292827262524
VECTKEY
R/W-FA05h
2322212019181716
VECTKEY
R/W-FA05h
15141312111098
ENDIANESSRESERVEDPRIGROUP
R-0hR-0hR/W-0h
76543210
RESERVEDSYSRESREQVECTCLRACTVECTRESET
R-0hW-0hW-0hW-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Register Map
Table 3-17. APINT Register Field Descriptions
BitFieldTypeResetDescription
31-16VECTKEYR/WFA05hRegister Key This field is used to guard against accidental writes to
15ENDIANESSR0hData Endianess The CC3200 implementation uses only little-endian
14-11RESERVEDR0h
10-8PRIGROUPR/W0hInterrupt Priority Grouping This field determines the split of group
7-3RESERVEDR0h
2SYSRESREQW0hSystem Reset Request This bit is automatically cleared during the
1VECTCLRACTW0hClear Active NMI / Fault This bit is reserved for Debug use and
0VECTRESETW0hSystem Reset This bit is reserved for Debug use and reads as 0.
this register.
0x05FA must be written to this field in order to change the bits in this
register.
On a read, 0xFA05 is returned.
mode so this is cleared to 0.
priority from subpriority
reset of the core and reads as 0.
0h = No effect.
1h = Resets the core and all on-chip peripherals except the Debug
interface.
reads as 0.
This bit must be written as a 0, otherwise behavior is unpredictable.
This bit must be written as a 0, otherwise behavior is unpredictable.
SYSCTRL is shown in Figure 3-15 and described in Table 3-18.
NOTE: his register can only be accessed from privileged mode. The SYSCTRL register controls features
CFGCTRL is shown in Figure 3-16 and described in Table 3-19.
NOTE: his register can only be accessed from privileged mode. The CFGCTRL register controls entry to
Thread mode and enables: the handlers for NMI, hard fault and faults escalated by the FAULTMASK
register to ignore bus faults; trapping of divide by zero and unaligned accesses; and access to the
SWTRIG register by unprivileged software.
Figure 3-16. CFGCTRL Register
3130292827262524
RESERVED
R-0h
2322212019181716
RESERVED
R-0h
15141312111098
RESERVEDSTKALIGNBFHFMIGN
R-0hR/W-1hR/W-0h
76543210
RESERVEDDIV0UNALIGNEDRESERVEDMANIPENDBASETHR
R-0hR/W-0hR/W-0hR-0hR/W-0hR/W-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Register Map
Table 3-19. CFGCTRL Register Field Descriptions
BitFieldTypeResetDescription
31-10RESERVEDR0h
9STKALIGNR/W1hStack Alignment on Exception Entry On exception entry, the
8BFHFMIGNR/W0hIgnore Bus Fault in NMI and Fault This bit enables handlers with
7-5RESERVEDR0h
4DIV0R/W0h
3UNALIGNEDR/W0hTrap on Unaligned Access Unaligned LDM, STM, LDRD, and STRD
processor uses bit 9 of the stacked PSR to indicate the stack
alignment.
On return from the exception, it uses this stacked bit to restore the
correct stack alignment.
0h = The stack is 4-byte aligned.
1h = The stack is 8-byte aligned.
priority -1 or -2 to ignore data bus faults caused by load and store
instructions.
The setting of this bit applies to the hard fault, NMI, and
FAULTMASK escalated handlers.
Set this bit only when the handler and its data are in absolutely safe
memory.
The normal use of this bit is to probe system devices and bridges to
detect control path problems and fix them.
0h = Data bus faults caused by load and store instructions cause a
lock-up.
1h = Handlers running at priority -1 and -2 ignore data bus faults
caused by load and store instructions.
Trap on Divide by 0 This bit enables faulting or halting when the
processor executes an SDIV or UDIV instruction with a divisor of 0.
0h = Do not trap on divide by 0. A divide by zero returns a quotient
of 0.
1h = Trap on divide by 0.
instructions always fault regardless of whether UNALIGNED is set.
0h = Do not trap on unaligned halfword and word accesses.
1h = Trap on unaligned halfword and word accesses. An unaligned
Table 3-19. CFGCTRL Register Field Descriptions (continued)
BitFieldTypeResetDescription
2RESERVEDR0h
1MANIPENDR/W0h
0BASETHRR/W0h
www.ti.com
Allow Main Interrupt Trigger
0h = Disables unprivileged software access to the SWTRIG register.
1h = Enables unprivileged software access to the SWTRIG register.
Thread State Control
0h = The processor can enter Thread mode only when no exception
is active.
1h = The processor can enter Thread mode from any level under the
SYSPRI1 is shown in Figure 3-17 and described in Table 3-20.
NOTE: his register can only be accessed from privileged mode. The SYSPRI1 register configures the
priority level, 0 to 7 of the usage fault, bus fault, and memory management fault exception handlers. This
register is byte-accessible.
Figure 3-17. SYSPRI1 Register
31302928272625242322212019181716
RESERVEDUSAGERESERVED
R-0hR/W-0hR-0h
1514131211109876543210
BUSRESERVEDMEMRESERVED
R/W-0hR-0hR/W-0hR-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-20. SYSPRI1 Register Field Descriptions
BitFieldTypeResetDescription
31-24RESERVEDR0h
23-21USAGER/W0hUsage Fault Priority This field configures the priority level of the
20-16RESERVEDR0h
15-13BUSR/W0hBus Fault Priority This field configures the priority level of the bus
12-8RESERVEDR0h
7-5MEMR/W0hMemory Management Fault Priority This field configures the priority
4-0RESERVEDR0h
usage fault.
Configurable priority values are in the range
0-7, with lower values having higher priority.
fault.
Configurable priority values are in the range
0-7, with lower values having higher priority.
level of the memory management fault.
Configurable priority values are in the range
0-7, with lower values having higher priority.
SYSPRI2 is shown in Figure 3-18 and described in Table 3-21.
NOTE: his register can only be accessed from privileged mode. The SYSPRI2 register configures the
priority level, 0 to 7 of the SVCall handler. This register is byte-accessible.
SYSPRI3 is shown in Figure 3-19 and described in Table 3-22.
NOTE: his register can only be accessed from privileged mode. The SYSPRI3 register configures the
priority level, 0 to 7 of the SysTick exception and PendSV handlers. This register is byte-accessible.
Figure 3-19. SYSPRI3 Register
31302928272625242322212019181716
TICKRESERVEDPENDSVRESERVED
R/W-0hR-0hR/W-0hR-0h
1514131211109876543210
RESERVEDDEBUGRESERVED
R-0hR/W-0hR-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
Table 3-22. SYSPRI3 Register Field Descriptions
BitFieldTypeResetDescription
31-29TICKR/W0hSysTick Exception Priority This field configures the priority level of
28-24RESERVEDR0h
23-21PENDSVR/W0hPendSV Priority This field configures the priority level of PendSV.
20-8RESERVEDR0h
7-5DEBUGR/W0hDebug Priority This field configures the priority level of Debug.
4-0RESERVEDR0h
the SysTick exception.
Configurable priority values are in the range
0-7, with lower values having higher priority.
Configurable priority values are in the range
0-7, with lower values having higher priority.
Configurable priority values are in the range
0-7, with lower values having higher priority.
SYSHNDCTRL is shown in Figure 3-20 and described in Table 3-23.
NOTE: his register can only be accessed from privileged mode. The SYSHNDCTRL register enables the
system handlers, and indicates the pending status of the usage fault, bus fault, memory management
fault, and SVC exceptions as well as the active status of the system handlers. If a system handler is
disabled and the corresponding fault occurs, the processor treats the fault as a hard fault. This register
can be modified to change the pending or active status of system exceptions. An OS kernel can write to
the active bits to perform a context switch that changes the current exception type. CAUTION: Software
that changes the value of an active bit in this register without correct adjustment to the stacked content
can cause the processor to generate a fault exception. Ensure software that writes to this register retains
and subsequently restores the current active status. If the value of a bit in this register must be modified
after enabling the system handlers, a read-modify-write procedure must be used to ensure that only the
required bit is modified.
Figure 3-20. SYSHNDCTRL Register
3130292827262524
RESERVED
R-0h
2322212019181716
RESERVEDUSAGEBUSMEM
R-0hR/W-0hR/W-0hR/W-0h
15141312111098
SVCBUSPMEMPUSAGEPTICKPNDSVRESERVEDMON
R/W-0hR/W-0hR/W-0hR/W-0hR/W-0hR/W-0hR-0hR/W-0h
76543210
SVCARESERVEDUSGARESERVEDBUSAMEMA
R/W-0hR-0hR/W-0hR-0hR/W-0hR/W-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
www.ti.com
Table 3-23. SYSHNDCTRL Register Field Descriptions
BitFieldTypeResetDescription
31-19RESERVEDR0h
18USAGER/W0h
17BUSR/W0h
16MEMR/W0h
15SVCR/W0hSVC Call Pending This bit can be modified to change the pending
14BUSPR/W0hBus Fault Pending This bit can be modified to change the pending
Usage Fault Enable
0h = Disables the usage fault exception.
1h = Enables the usage fault exception.
Bus Fault Enable
0h = Disables the bus fault exception.
1h = Enables the bus fault exception.
Memory Management Fault Enable
0h = Disables the memory management fault exception.
1h = Enables the memory management fault exception.
status of the SVC call exception.
0h = An SVC call exception is not pending.
1h = An SVC call exception is pending.
status of the bus fault exception.
0h = A bus fault exception is not pending.
1h = A bus fault exception is pending.
Table 3-23. SYSHNDCTRL Register Field Descriptions (continued)
BitFieldTypeResetDescription
13MEMPR/W0hMemory Management Fault Pending This bit can be modified to
12USAGEPR/W0hUsage Fault Pending This bit can be modified to change the pending
11TICKR/W0hSysTick Exception Active This bit can be modified to change the
10PNDSVR/W0hPendSV Exception Active This bit can be modified to change the
9RESERVEDR0h
8MONR/W0h
7SVCAR/W0hSVC Call Active This bit can be modified to change the active status
6-4RESERVEDR0h
3USGAR/W0hUsage Fault Active This bit can be modified to change the active
2RESERVEDR0h
1BUSAR/W0hBus Fault Active This bit can be modified to change the active status
0MEMAR/W0hMemory Management Fault Active This bit can be modified to
change the pending status of the memory management fault
exception.
0 = A memory management fault exception is not pending.
1 = A memory management fault exception is pending.
status of the usage fault exception.
0h = A usage fault exception is not pending.
1h = A usage fault exception is pending.
active status of the SysTick exception, however, see the Caution
above before setting this bit.
0h = A SysTick exception is not active.
1h = A SysTick exception is active.
active status of the PendSV exception, however, see the Caution
above before setting this bit.
0h = A PendSV exception is not active.
1h = A PendSV exception is active.
Debug Monitor Active
0h = The Debug monitor is not active.
1h = The Debug monitor is active.
of the SVC call exception, however, see the Caution above before
setting this bit.
0h = SVC call is not active.
1h = SVC call is active.
status of the usage fault exception, however, see the Caution above
before setting this bit.
0h = Usage fault is not active.
1h = Usage fault is active.
of the bus fault exception, however, see the Caution above before
setting this bit.
0h = Bus fault is not active.
1h = Bus fault is active.
change the active status of the memory management fault
exception, however, see the Caution above before setting this bit.
0h = Memory management fault is not active.
1h = Memory management fault is active.
FAULTSTAT is shown in Figure 3-21 and described in Table 3-24.
NOTE: his register can only be accessed from privileged mode. The FAULTSTAT register indicates the
cause of a memory management fault, bus fault, or usage fault. Each of these functions is assigned to a
subregister as follows: Usage Fault Status (UFAULTSTAT), bits 31:16 Bus Fault Status (BFAULTSTAT),
bits 15:8 Memory Management Fault Status (MFAULTSTAT), bits 7:0 (Not applicable for CC3200)
FAULTSTAT is byte accessible. FAULTSTAT or its subregisters can be accessed as follows: The
complete FAULTSTAT register, with a word access to offset 0xD28 The MFAULTSTAT, with a byte
access to offset 0xD28 The MFAULTSTAT and BFAULTSTAT, with a halfword access to offset 0xD28
The BFAULTSTAT, with a byte access to offset 0xD29 The UFAULTSTAT, with a halfword access to
offset 0xD2A Bits are cleared by writing a 1 to them. In a fault handler, the true faulting address can be
determined by: 1. Read and save the Memory Management Fault Address (MMADDR) or Bus Fault
Address (FAULTADDR) value. 2. Read the MMARV bit in MFAULTSTAT, or the BFARV bit in
BFAULTSTAT to determine if the MMADDR or FAULTADDR contents are valid. Software must follow this
sequence because another higher priority exception might change the MMADDR or FAULTADDR value.
For example, if a higher priority handler preempts the current fault handler, the other fault might change
the MMADDR or FAULTADDR value.
stacked for the exception return points to the instruction that
performed the divide by zero.
Trapping on divide-by-zero is enabled by setting the DIV0 bit in the
Configuration and Control (CFGCTRL) register.
This bit is cleared by writing a 1 to it.
0h = No divide-by-zero fault has occurred, or divide-by-zero trapping
is not enabled.
1h = The processor has executed an SDIV or UDIV instruction with a
divisor of 0.
STRD instructions always fault regardless of the configuration of this
bit.
Trapping on unaligned access is enabled by setting the UNALIGNED
bit in the CFGCTRL register.
This bit is cleared by writing a 1 to it.
0h = No unaligned access fault has occurred, or unaligned access
trapping is not enabled.
1h = The processor has made an unaligned memory access.
SWRU367D–June 2014–Revised May 2018
Submit Documentation Feedback
www.ti.com
Table 3-24. FAULTSTAT Register Field Descriptions (continued)
BitFieldTypeResetDescription
19NOCPR/W1C0hNo Coprocessor Usage Fault This bit is cleared by writing a 1 to it.
0h = A usage fault has not been caused by attempting to access a
coprocessor.
1h = The processor has attempted to access a coprocessor.
18INVPCR/W1C0hInvalid PC Load Usage Fault When this bit is set, the PC value
stacked for the exception return points to the instruction that tried to
perform the illegal load of the PC.
This bit is cleared by writing a 1 to it.
0h = A usage fault has not been caused by attempting to load an
invalid PC value.
1h = The processor has attempted an illegal load of EXC_RETURN
to the PC as a result of an invalid context or an invalid
EXC_RETURN value.
17INVSTATR/W1C0hInvalid State Usage Fault When this bit is set, the PC value stacked
for the exception return points to the instruction that attempted the
illegal use of the Execution Program Status Register (EPSR)
register.
This bit is not set if an undefined instruction uses the EPSR register.
This bit is cleared by writing a 1 to it.
0h = A usage fault has not been caused by an invalid state.
1h = The processor has attempted to execute an instruction that
makes illegal use of the EPSR register.
16UNDEFR/W1C0hUndefined Instruction Usage Fault When this bit is set, the PC value
stacked for the exception return points to the undefined instruction.
An undefined instruction is an instruction that the processor cannot
decode.
This bit is cleared by writing a 1 to it.
0h = A usage fault has not been caused by an undefined instruction.
1h = The processor has attempted to execute an undefined
instruction.
15BFARVR/W1C0hBus Fault Address Register Valid This bit is set after a bus fault,
where the address is known.
Other faults can clear this bit, such as a memory management fault
occurring later.
If a bus fault occurs and is escalated to a hard fault because of
priority, the hard fault handler must clear this bit.
This action prevents problems if returning to a stacked active bus
fault handler whose FAULTADDR register value has been
overwritten.
This bit is cleared by writing a 1 to it.
0h = The value in the Bus Fault Address (FAULTADDR) register is
not a valid fault address.
1h = The FAULTADDR register is holding a valid fault address.
14RESERVEDR0h
13BLSPERRR/W1C0hN/A
12BSTKER/W1C0hStack Bus Fault When this bit is set, the SP is still adjusted but the
values in the context area on the stack might be incorrect.
A fault address is not written to the FAULTADDR register.
This bit is cleared by writing a 1 to it.
0h = No bus fault has occurred on stacking for exception entry.
1h = Stacking for an exception entry has caused one or more bus
faults.
11BUSTKER/W1C0hUnstack Bus Fault This fault is chained to the handler.
Thus, when this bit is set, the original return stack is still present.
The SP is not adjusted from the failing return, a new save is not
performed, and a fault address is not written to the FAULTADDR
register.
This bit is cleared by writing a 1 to it.
0h = No bus fault has occurred on unstacking for a return from
exception.
1h = Unstacking for a return from exception has caused one or more
HFAULTSTAT is shown in Figure 3-22 and described in Table 3-25.
NOTE: his register can only be accessed from privileged mode. The HFAULTSTAT register gives
information about events that activate the hard fault handler. Bits are cleared by writing a 1 to them.
Figure 3-22. HFAULTSTAT Register
3130292827262524
DBGFORCEDRESERVED
R/W1C-0hR/W1C-0hR-0h
2322212019181716
RESERVED
R-0h
15141312111098
RESERVED
R-0h
76543210
RESERVEDVECTRESERVED
R-0hR/W1C-0hR-0h
LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset
www.ti.com
Table 3-25. HFAULTSTAT Register Field Descriptions
BitFieldTypeResetDescription
31DBGR/W1C0hDebug EventThis bit is reserved for Debug use.
30FORCEDR/W1C0hForced Hard Fault When this bit is set, the hard fault handler must
29-2RESERVEDR0h
1VECTR/W1C0hVector Table Read Fault This error is always handled by the hard
0RESERVEDR0h
This bit must be written as a 0, otherwise behavior is unpredictable.
read the other fault status registers to find the cause of the fault.
This bit is cleared by writing a 1 to it.
0h = No forced hard fault has occurred.
1h = A forced hard fault has been generated by escalation of a fault
with configurable priority that cannot be handled, either because of
priority or because it is disabled.
fault handler.
When this bit is set, the PC value stacked for the exception return
points to the instruction that was preempted by the exception.
This bit is cleared by writing a 1 to it.
0h = No bus fault has occurred on a vector table read.
FAULTDDR is shown in Figure 3-23 and described in Table 3-26.
NOTE: his register can only be accessed from privileged mode. The FAULTADDR register contains the
address of the location that generated a bus fault. When an unaligned access faults, the address in the
FAULTADDR register is the one requested by the instruction, even if it is not the address of the fault. Bits
in the Bus Fault Status (BFAULTSTAT) register indicate the cause of the fault and whether the value in
the FAULTADDR register is valid.
SWTRIG is shown in Figure 3-24 and described in Table 3-27.
NOTE: Only privileged software can enable unprivileged access to the SWTRIG register. Writing an
interrupt number to the SWTRIG register generates a Software Generated Interrupt (SGI). When the
MAINPEND bit in the Configuration and Control (CFGCTRL) register is set, unprivileged software can
access the SWTRIG register.
The CC3200 microcontroller includes a Direct Memory Access (DMA) controller, known as micro-DMA
(μDMA). The μDMA controller provides a way to offload data transfer tasks from the Cortex-M4 processor,
allowing for more efficient use of the processor and the available bus bandwidth. The μDMA controller can
perform transfers between memory and peripherals. It has dedicated channels for each supported on-chip
module and can be programmed to automatically perform transfers between peripherals and memory, as
the peripheral is ready to transfer more data.
The μDMA controller provides the following features:
•32-channel configurable µDMA controller
•Support for memory-to-memory, memory-to-peripheral, and peripheral-to-memory in multiple transfer
modes
– Basic for simple transfer scenarios
– Ping-pong for continuous data flow
– Scatter-gather for a programmable list of up to 256 arbitrary transfers initiated from a single request
•Highly flexible and configurable channel operation
– Independently configured and operated channels
– Dedicated channels for supported on-chip modules
– One channel each for receive and transmit path for bidirectional modules
– Dedicated channel for software-initiated transfers
– Optional software-initiated requests for any channel
•Two levels of priority
•Design optimizations for improved bus access performance between µDMA controller and the
processor core
– µDMA controller access is subordinate to core access
•Data sizes of 8, 16, and 32 bits
•Transfer size is programmable in binary steps from 1 to 1024
•Source and destination address increment size of byte, half-word, word, or no increment
•Interrupt on transfer completion, with a separate interrupt per channel
www.ti.com
4.2Functional Description
The μDMA controller is a flexible and highly configurable DMA controller designed to work efficiently with
the Cortex-M4 processor core. It supports multiple data sizes and address increment schemes, multiple
levels of priority among DMA channels, and several transfer modes to allow for sophisticated programmed
data transfers. The μDMA controller's usage of the bus is always subordinate to the processor core, so it
never delays a bus transaction by the processor.
Because the μDMA controller is only using otherwise-idle bus cycles, the data transfer bandwidth it
provides is essentially free, with no impact on the rest of the system. The bus architecture has been
optimized to greatly enhance the ability of the processor core and the μDMA controller to efficiently share
the on-chip bus, thus improving performance. The optimizations include peripheral bus segmentation,
which in many cases allow both the processor core and the μDMA controller to access the bus and
perform simultaneous data transfers.
Each supported peripheral function has a dedicated channel on the μDMA controller that can be
configured independently. The μDMA controller implements a configuration method using channel control
structures maintained in system memory by the processor. While simple transfer modes are supported, it
is also possible to build up sophisticated task lists in memory that allow the μDMA controller to perform
arbitrary-sized transfers to and from arbitrary locations as part of a single transfer request. The μDMA
controller also supports the use of ping-pong buffering to accommodate constant streaming of data to or
from a peripheral.
Each channel also has a configurable arbitration size. The arbitration size is the number of items
transferred in a burst before the μDMA controller re-arbitrates for channel priority. Using the arbitration
size, it is possible to control exactly how many items are transferred to or from a peripheral each time it
makes a μDMA service request.
4.2.1 Channel Assignment
Figure 4-1 depicts μDMA channel allocation. There ae 32 DMA channels assigned to various peripherals.
Peripherals are mapped at multiple places to address the application need where any combination of
peripheral can be used in tandem.
The μDMA controller assigns priority to each channel based on the channel number and the priority level
bit for the channel. Channel number 0 has the highest priority, and as the channel number increases, the
priority of a channel decreases. Each channel has a priority level bit to provide two levels of priority:
default priority and high priority. If the priority level bit is set, then that channel has higher priority than all
other channels at default priority. If multiple channels are set for high priority, then the channel number
determines relative priority among all the high priority channels.
The priority bit for a channel can be set using the DMA Channel Priority Set (PRIOSET) register and
cleared with the DMA Channel Priority Clear (PRIOCLR) register.
4.2.3 Arbitration Size
When a μDMA channel requests a transfer, the μDMA controller arbitrates among all the channels making
a request, then services the μDMA channel with the highest priority. Once a transfer begins, it continues
for a selectable number of transfers before re-arbitrating among the requesting channels again. The
arbitration size can be configured for each channel, ranging from 1 to 1024 item transfers. After the μDMA
controller transfers the number of items specified by the arbitration size, it then checks among all the
channels making a request, and services the channel with the highest priority. If a lower priority μDMA
channel uses a large arbitration size, the latency for higher priority channels is increased, as the μDMA
controller completes the lower priority burst before checking for higher priority requests. Therefore, lower
priority channels should not use a large arbitration size for best response on high priority channels.
The arbitration size can also be thought of as a burst size, as it is the maximum number of items that are
transferred at any one time in a burst. Here, the term arbitration refers to determination of μDMA channel
priority, not arbitration for the bus. When the μDMA controller arbitrates for the bus, the processor always
takes priority. Furthermore, the μDMA controller is held off whenever the processor must perform a bus
transaction on the same bus, even in the middle of a burst transfer.
www.ti.com
4.2.4 Channel Configuration
The μDMA controller uses an area of system memory to store a set of channel control structures in a
table. The control table may have one or two entries for each μDMA channel. Each entry in the table
structure contains source and destination pointers, transfer size, and transfer mode. The control table can
be located anywhere in system memory, but it must be contiguous and aligned on a 1024-byte boundary.
Table 4-1 shows the layout in memory of the channel control table. Each channel may have one or two
control structures in the control table: a primary control structure and an optional alternate control
structure. The table is organized so that all of the primary entries are in the first half of the table, and all
the alternate structures are in the second half of the table. The primary entry is used for simple transfer
modes, where transfers can be reconfigured and restarted after each transfer is complete. In this case, the
alternate control structures are not used and therefore only the first half of the table must be allocated in
memory; the second half of the control table is not necessary, and that memory can be used for
something else. If a more complex transfer mode is used such as ping-pong or scatter-gather, then the
alternate control structure is also used and memory space should be allocated for the entire table.
Any unused memory in the control table may be used by the application. This includes the control
structures for any channels that are unused by the application, as well as the unused control word for
each channel.