CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single
1Introduction
The CC3200 SimpleLink™ Wi-Fi®is the industry’s first single-chip microcontroller (MCU) with built-in Wi-Fi
connectivity, created for the Internet of Things (IoT). The 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. This document introduces the user to the environment setup for the CC3200 SimpleLink Wi-Fi,
along with programming examples from the software development kit (SDK). This document explains both
the platform and the framework available to enable further application development.
1.1Overview
The Texas Instruments royalty-free CC3200 Embedded Wi-Fi Foundation software development kit is a
complete software platform for developing Wi-Fi applications. It is based on the CC3200, a complete Wi-Fi
SoC (System-on-Chip) solution. The CC3200 solution combines a 2.4-GHz Wi-Fi PHY/MAC and TCP/IP
networking engine with a microcontroller, 256 kB on-chip RAM, and a comprehensive range of
peripherals.
Refer to the CC3200 Product Preview and Data Sheet (SWAS032) for more details on the CC3200 chip.
Programmer's Guide
SWRU369D–June 2014–Revised May 2018
Chip Wireless MCU
1.2Software Components
The CC3200 platform includes a user-programmable host, along with a comprehensive networking
solution combined with a Wi-Fi engine. The CC3200 Foundation software development kit provides an
easy-to-use framework, hosted in the on-chip microcontroller, to use the WLAN networking services, along
with a comprehensive listing of drivers for peripherals interfaced with the microcontroller. The kit also
includes a reference code for peripheral usage and a few simple applications for networking services.
Figure 1. CC3200 Overview of Peripherals
6
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
The CC3200 LaunchPad board is the default hardware companion for the foundation SDK. This board
hosts the CC3200 device, with interfaces designed for application software development and debugging.
The CC3200 LaunchPad also supports the TI Booster Pack interface, allowing the user to interface with a
rich repertoire of peripheral systems.
Refer to the CC3200 Launch Pad user manual (SWRU372) for more details.
Figure 3. CC3200 LaunchPad Platform
www.ti.com
8
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
• Documentation for hardware details present in Hardware folder
• Documentation for SimpleLink host driver in html format under docs\simplelink_api’ directory
• Application notes for all the sample application present in docs\examples directory.
• Peripheral driver library user’s guide
• Documentation for netapps libraries
• SimpleLink OTA Extlib API user's guide
• Contains the peripheral driver library source files.
• The driverlib.a is also provided in the ccs and ewarm directories.
• Getting Started in STA Mode: Configures the CC3200 in STA mode. It verifies the connection by
pinging the client connected to it.
• Getting Started in AP Mode: Configures the CC3200 in AP mode. It verifies the connection by pinging
the client connected to it.
• TCP Socket: Demonstrates the connection scenario and basic TCP functionality.
• UDP Socket: Demonstrates the connection scenario and basic UDP functionality.
• Scan Policy: Demonstrates the scan-policy settings in the CC3200.
• SSL: SSL certificates are designed to provide two principles, privacy and authentication. Privacy is
achieved by encryption and decryption, and authentication is achieved by signature and verification.
The application demonstrates using a certificate with SSL.
• MAC Filters (NWP Filters): The Rx-Filters feature enables the user to define and manage the Rxfiltering process, to reduce the amount of traffic transferred to the host and achieve efficient power
management.
• File_operations: Demonstrates the use of file-system APIs.
• Transceiver_mode: Demonstrates building a proprietary protocol on top of Wi-Fi PHY layer, with the
user given full flexibility to build their own packet. The RX Statistics feature inspects the medium in
terms of congestion, distance, validation of the RF hardware, and help using the RSSI information.
• Provisioning with WPS: Demonstrates the usage of WPS Wi-Fi provisioning with the
CC31xx/CC32xx.
• Provisioning with SmartConfig: Demonstrates the usage of TI's SmartConfig™ Wi-Fi provisioning
technique.
• Hib: Showcases hibernate as a power saving tool in a networking context (in this case, as a UDP
client).
• Get Time: Connects to an SNTP server and requests for time information.
• Get Weather: Connects to Open Weather Map and requests for weather data.
• Email: Sends emails through SMTP. The email application sends a preconfigured email at the push of
a button, or a user-configured email through the CLI.
• XMPP: Demonstrates the connection scenario with an XMPP server.
• Serial Wi-Fi: Serial Wi-Fi is a capability designed to provide easy, self-contained terminal access
behavior, over a UART interface.
• Connection Policy: Demonstrates the connection policies in the CC3200. The connection policies
determine how the CC3200 connects to the AP.
• ENT Wlan: Demonstrates the connection to an enterprise network using the flashed certificate.
Certificate is flashed in SFLASH.
• HTTP server: Demonstrates the HTTP server capability of the CC3200.
• mDNS: Demonstrates the usage of mDNS functionality in the CC3200. The application showcases both
mDNS advertise and mDNS listen functionality.
• Mode config: Switches the CC3200 LP from STA to AP and vice-versa.
• LED Blink Application: Showcases the usage of GPIO DriverLib APIs. The LEDs connected to the
GPIOs on the LP are used to indicate the GPIO output.
• Timer Demo Application: Showcases the usage of timer DriverLib APIs. This application uses 16-bit
timers to generate interrupts, which in turn toggle the state of the GPIO (driving LEDs).
• Watchdog Demo Application: Showcases the usage of watchdog timer (WDT) DriverLib APIs. The
objective of this application is to showcase the watchdog timer functionality to reset the system when
the system fails.
• UART Demo Application: Showcases the usage of UART DriverLib APIs. The application
demonstrates a simple echo of anything the user types on the terminal.
Foundation SDK – Getting Started
Table 1. Package Contents
SWRU369D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
• OTA Update: Illustrates over-the-air (OTA) updates of the service pack, user application, and user files.
• Dynamic Library Loader: Exercises an approach to enable dynamic loading of an application-binary
from non-volatile memory while the program is being executed.
• Contains the register definition header files.
• Contains the interface file to configure Free-RTOS or TI-RTOS.
• Contains power management framework to provide a simple infrastructure for developers to create a
power aware solution.
• http: Contains the HTTP (Hyper Text Transfer Protocol) client and server library
• smtp: Contains the SMTP (Simple Mail Transfer Protocol) client library
• tftp: Contains the TFTP (Trivial File Transfer Protocol) client library
• xmpp: Contains the XMPP (Extensive Messaging and Presence Protocol) client library
• json: Contains JSON parser library
• mqtt: Contains the MQTT (Message Queue Telemetry Transport) client and server library
• Contains SimpleLink host driver code.
• Contains the OTA (over the air) library
• Documentation for netapps libraries
• Contains the FatFS source files.
• Contains the FreeRTOS source files. Current SDK supports FreeRTOS v8.0.1.
• Contains the Ti RTOS config file and CCS, IAR , GCC projects to support TI-RTOS with all three IDEs.
Current SDK supports TI-RTOS v2.15.00.17.
• ccs_patch – Contains the files required for CCS-FTDI-LP connection.
• iar_patch – Contains the files required for IAR-FTDI-LP connection.
• ftdi - Contains FTDI PC driver.
• gcc_scripts - Contains the scripts to use GCC and openocd with CC3200.
2.3Prerequisite: Tools to be Installed
Table 2. CC3200 Prerequisite
ToolsRemarksLocation
Equipment
ComputerRunning Microsoft® Windows® 7 OSN/A
Development Environment
IARIAR version 7.20 onwards must be installed. After the
Or/and
CCSCCS 6.1.1 version and TI v5.2.6 compiler version. After
CC3200 Support package in
CCSv6.1
Or/and
GCCTo enable CC3200 SDK development on a Linux
SWRU369D–June 2014–Revised May 2018
Submit Documentation Feedback
installation, follow the tools\iar_patch\readme.txt to
debug over FTDI.
the installation, follow the tools\ccs_patch\readme.txt to
debug over FTDI.
Though CCS 6.1.1 provides an option to install this
add-on during installation, the user must check and
install if a newer version is available.
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
13
Foundation SDK – Components
Table 2. CC3200 Prerequisite (continued)
ToolsRemarksLocation
CC32xx PinMux Utility
CC32xx PinMux Utility.exeUtility to assign a desired personality to the general
purpose pins available at the CC3200 device boundary.
CC32xx Programmer Utility
UniflashTool to download firmware, application images, and
certificates to the CC3200 device.
Support Tools
HyperTerminal or TeratermSerial communication tool to communicate over the
UART with the CC3200 device.
IperfA useful tool for measuring TCP and UDP bandwidth
performance.
FTDI DriverFTDI Windows drivers must be installed for a
successful connection to the CC3200 LP over USB.
This FTDI connection can be used for debugging over
JTAG/SWD and communicating over UART.
3Foundation SDK – Components
The CC3200 Foundation SDK package includes two main building blocks:
•SimpleLink Library – This library hosts APIs that serve the connectivity features.
•Peripheral Driver Library – This library hosts APIs to access MCU peripherals.
This section also lists the sample and reference applications packaged in the software development kit.
www.ti.com
Installation:
http://processors.wiki.ti.com/index.php/TI_
PinMux_Tool or refer to Section 5.3.2.2
TI SimpleLink Framework provides a wide set of capabilities, including basic device management through
wireless network configuration, BSD socket services, and more. For better design granularity, these
capabilities are segregated into individual modules. Each module represents different functionality or
capability of the SimpleLink Framework.
14
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
The following list enumerates the different components in the SimpleLink Framework:
ComponentsFunctionality
device
wlan
socket
netapp
netcfg
fs
• Initializes the host
• Controls the communication with the network processor
• Connection to the access point
• Scan access points
• Add or remove access point profiles
• WLAN security
• UDP/TCP client socket
• UDP/TCP server socket
• UDP/TCP Rx/Tx
• DNS resolution
• Ping remote device
• Address resolution protocol
• IP and MAC address configuration
• File system read/write
3.1.2Using the TI SimpleLink Framework
The TI SimpleLink Framework provides a rich, yet simple set of APIs. For detailed information on the APIs
and their usage, refer to the document docs\simplelink_api\programmers_guide.html available in the SDK.
The TI SimpleLink Framework has a ready-to-use port available in the CC3200 Foundation SDK. The
source code is also shared if further customization is desired by the developer. The following note
describes simple possible customizations and the associated procedure.
Foundation SDK – Components
NOTE: All modifications and adjustments to the driver should be made in the user.h header file only,
to ensure a smooth transaction to future versions of the driver.
•Modify user.h file – Modify the user.h file that includes the default configurations and adjustments.
•Select the capabilities set required for your application – TI has focused on building a set of
predefined capability sets that fit most target applications. TI recommends trying and choosing one of
these predefined capabilities sets before building a customized set. Once a compatible set is found,
skip the rest of this step. The available sets are:
– # SL_TINY – Compatible with platforms with very limited resources. Provides the best-in-class
footprint in terms of code and data consumption.
– # SL_SMALL – Compatible with most common networking applications. Provides the most common
APIs with a balance between code size, data size, functionality, and performance.
– # SL_FULL – Provides access to all SimpleLink functionalities.
•Memory management model – The SimpleLink driver supports two memory models:
– Static (default)
– Dynamic
The CC3200 default configuration is static. In the dynamic model, the configuration uses the malloc
and free, as defined by the operating system. To define your own memory management, define
these interfaces.
•Asynchronous event handlers routines – The SimpleLink device generates asynchronous events in
certain situations. These asynchronous events can be masked. Provide handler routines to catch these
events. If a handler routine was not provided and the event is received, the driver drops this event
without any indication of a drop.
SWRU369D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
•Interface communication driver – The CC3200 host driver implements an SPI communication
interface. The interface for this communication channel includes four simple access functions:
1. open
2. close
3. read
4. write
The CC3200, SPI implementation uses DMA to increase the utilization of the communication
channel.
•OS adaptation – The SimpleLink driver can run on two kinds of platforms:
– Non-OS / single-threaded (default)
– Multi-threaded
The CC3200 SimpleLink host driver is ported on both non-OS and multi-threaded OS
environments. The host driver is made OS-independent by implementing an OS abstraction layer.
Reference implementation for OS abstraction is available for FreeRTOS and TI-RTOS.
To work in a multi-threaded environment under a different operating system, provide some basic
adaptation routines to allow the driver to protect access to resources for different threads (locking
object) and to allow synchronization between threads (sync objects). In addition, the driver support
runs without a dedicated thread allocated solely to the SimpleLink driver. To work in this mode,
supply a spawn method that enables functions to run on a temporary context.
3.1.3Switch Between OS, NON-OS, and Debug Configurations
IAR: Choose configuration options from menu Project->Edit configurations-
>OS/NON_OS/PM_Framework/NON_OS_PM/OS_debug/NON_OS_debug/PM_Framework_debug/NON_
OS_PM_debug, as indicated in Figure 8.
www.ti.com
Figure 8. CC3200 SimpleLink IAR Config Switch
16
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
CCS: Choose configuration options from menu Project->Build Configurations->Set active, or as indicated
in Figure 9:
Foundation SDK – Components
Figure 9. CC3200 CCS SimpleLink Config Switch
3.1.4Development versus Deployment Scenario
To support the usage of the reloading of application image using the debugger without having to reset the
device (LaunchPad), the implementation in the cc_pal* (simplelink) file requires a NwpPowerOnPreamble
routine to stop networking services, and a delay in the NwpPowerOn() function must be introduced for
proper operation.
This is required, as a core reset from the debugger only resets when the APPs processor and the
networking engine are still active. Thus, on the next debug session, the networking engine must be
gracefully stopped and started again. This results in additional delays and greater overall current
consumption. As these additional steps and delay are required only for debugging purposes, they should
not be a part of the deployment applications.
For ease of use, the CC3200 SDK latest package provides separate configurations of SimpleLink library
for the development (debug) and deployment scenarios. The following four items should be used for the
deployment scenario (this does not include the additional steps and delay) as per use-case.
•NON_OS – SimpleLink for NON-OS environment
•OS – SimpleLink for OS environment
•PM_Framework – SimpleLink with power management framework for OS environment
•NON_OS_PM – SimpleLink with power management framework hook
All of these configurations are pre-built in the SDK package, along with their generated output library. By
default, all of the networking examples link to one of these configurations.
The corresponding debug configurations are also present as part of the project.
•NON_OS_debug – SimpleLink for NON-OS environment with debug support
•OS_debug – SimpleLink for OS environment with debug support
•PM_Framework_debug – SimpleLink with power management framework for OS environment with
debug support
SWRU369D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
•NON_OS_PM_debug – SimpleLink with power management framework hook with debug support
These configurations are not pre-built; the user must build them first before linking them to their
application. Note that this will result in overall greater current consumption. Link the networking example to
the debug configurations of the SimpleLink library while debugging to enhance the user experience.
Follow these steps to link the application to the debug configuration.
3.1.4.1Relinking to the SimpleLink Library in CCS
1. Compile the relevant debug configuration for SimpleLink library.
2. Right-click on the application, and navigate to Properties>ARM Linker>File Search Path.
3. Edit the SimpleLink library path as shown in Figure 10 and Figure 11.
Figure 10. File Search Path
www.ti.com
18
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
1. Compile the relevant debug configuration for the SimpleLink library.
2. Open the application’s Makefile, and navigate to the linking portion.
3. Change the linking code as shown in Figure 14 and Figure 15.
Figure 14. Linking Code Example 1
Figure 15. Linking Code Example 2
Foundation SDK – Components
3.2Peripheral Driver Library
The CC3200 ROM contains the peripheral driver library (DriverLib) and the boot loader. DriverLib can be
utilized by applications to reduce their flash footprint, allowing the flash (or RAM) to be used for other
purposes (such as additional features in the application).
The Driverlib supports APIs for the modules listed below:
•ADC_Analog_to_Digital_Converter_api
•AES_Advanced_Encryption_Standard_api
•Camera_api
•CRC_Cyclic_Redundancy_Check_api
•DES_Data_Encryption_Standard_api
•Flash_api
•GPIO_General_Purpose_InputOutput_api
•HwSpinLock_api
•I2C_api
•I2S_api
•Interrupt_api
SWRU369D–June 2014–Revised May 2018
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
For detailed information on the APIs and their usage, refer to the document docs\CC3200 PeripheralDriver Library User's Guide.chm.
3.3Reference Applications
The reference applications available as a part of the SDK package are example implementations which
demonstrate key features and peripherals supported by the subsystem built around the CC3200 device on
the LaunchPad. A brief description of the reference applications are tabulated below. Refer to the
readme.txt present in the individual folders for further information. All examples are broadly divided into
two types: the network reference and the MCU-only reference examples.
www.ti.com
3.3.1Network Reference Examples for the CC3200 LP
Application / DemoDescriptionPeripheral/Feature exercised
Getting started with wLAN
Station
Getting started with wLANAPShowcases the device's capability as an AP in a typical
TCP Socket ApplicationShowcases the device's communication over network using
WLAN Scan Policies
Application
UDP Socket ApplicationShowcases the device's communication over network using
SSL Demo ApplicationShowcases SSL implementation on the CC3200 device.Networking (SSL)
NWP Filter ApplicationShowcases the Rx-Filter feature on the CC3200 device.Networking (MAC Filters)
File Operations ApplicationShowcases the file operation on the serial flash of the device.SFlash (File operations)
Transceiver mode
Application
Provisioning - Smart ConfigDemonstrates how to associate and connect the
Hibernate ApplicationShowcases hibernate as a power saving tool in a networking
Info Center-Get Time
Application
Info Center-Get Weather
Application
Email ApplicationSends emails through SMTP.Networking, GPIO, UART, Timer
XMPP Reference Application Demonstrates the connection scenario with an XMPP server.Networking (Internet)
Provisioning-WPS
Application
Showcases the device's capability as a station in a typical
networking system.
networking system.
TCP protocols.
Sets scan policy and enables the scan in the device.Networking (Scan policies)
TCP protocols.
Inspects the medium in terms of congestion and distance,
validates he RF hardware, and help using the RSSI
information.
CC31xx/CC32xx to any access point.
context (in this case, a UDP client).
Connects to an SNTP server and requests for time
information.
Connects to Open Weather Map and requests for weather
data.
Demonstrates how to use WPS Wi-Fi provisioning with the
CC3200.
Networking (STA mode)
Networking (AP mode)
Networking (Basics)
Networking (Basics)
Networking (Raw sockets),
GPIO, UART, Timer
Networking (Provisioning)
Networking, Low power modes
(HIB), UART, GPIO, Timer
Networking (Internet)
Networking (Internet)
Networking (Provisioning), GPIO
22
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU