Texas Instruments CC3200 SimpleLink Wi-Fi Programmer's Manual

CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU

Programmer's Guide
Literature Number: SWRU369D
June 2014–Revised May 2018
Contents
1 Introduction......................................................................................................................... 6
1.1 Overview .................................................................................................................. 6
1.2 Software Components................................................................................................... 6
1.3 CC3200 LaunchPad Platform .......................................................................................... 8
2 Foundation SDK – Getting Started ......................................................................................... 9
2.1 Installation................................................................................................................. 9
2.2 Package Components Overview...................................................................................... 11
2.3 Prerequisite: Tools to be Installed .................................................................................... 13
3 Foundation SDK – Components ........................................................................................... 14
3.1 SimpleLink Component Library....................................................................................... 14
3.2 Peripheral Driver Library............................................................................................... 21
3.3 Reference Applications ................................................................................................ 22
3.4 CC3200 PinMux Utility ................................................................................................. 24
4 Getting Started With the CC3200 LaunchPad......................................................................... 25
5 Foundation SDK – Development Flow................................................................................... 26
5.1 Simple Networking Applications...................................................................................... 26
5.2 SimpleLink APIs ........................................................................................................ 40
5.3 Compilation, Build and Execution Procedure ....................................................................... 40
5.4 Flashing and Running the .bin Using the Uniflash Tool ........................................................... 67
6 CC3200 ROM Services ........................................................................................................ 67
6.1 CC3200 Bootloader .................................................................................................... 67
6.2 CC3200 Peripheral Driver Library Services in ROM............................................................... 68
7 Additional Resources.......................................................................................................... 71
Revision History.......................................................................................................................... 72
2

Table of Contents

Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
1 CC3200 Overview of Peripherals.......................................................................................... 6
2 CC3200 Software Components............................................................................................ 7
3 CC3200 LaunchPad Platform .............................................................................................. 8
4 CC3200 SDK Installation 1................................................................................................. 9
5 CC3200 SDK Installation 2................................................................................................. 9
6 CC3200 SDK Installation 3 ............................................................................................... 10
7 SimpleLink Modular Composition ........................................................................................ 14
8 CC3200 SimpleLink IAR Config Switch ................................................................................. 16
9 CC3200 CCS SimpleLink Config Switch ................................................................................ 17
10 File Search Path............................................................................................................ 18
11 Edit Directory Path ......................................................................................................... 19
12 Edit SimpleLink Library Path.............................................................................................. 20
13 Edit SimpleLink Library Path.............................................................................................. 20
14 Linking Code Example 1 .................................................................................................. 21
15 Linking Code Example 2 .................................................................................................. 21
16 CC3200 Programmer Guide Device Manager.......................................................................... 25
17 TCP Socket Terminal ...................................................................................................... 33
18 UDP Socket Terminal...................................................................................................... 37
19 CC3200 Transceiver Application on the Hyperterminal............................................................... 39
20 CC3200 Programmer Guide IAR Project Options ..................................................................... 41
21 CC3200 IAR Compiling Project........................................................................................... 41
22 CC3200 IAR Linker Project............................................................................................... 42
23 CC3200 IAR Linker Config................................................................................................ 43
24 CC3200 IAR Generating Binary.......................................................................................... 44
25 CC3200 IAR Executing ................................................................................................... 45
26 CC3200 IAR Download and Run......................................................................................... 45
27 CCS App Center............................................................................................................ 46
28 TI-PinMux Tool ............................................................................................................. 47
29 Select CCS Projects to Import ........................................................................................... 48
30 CC3200 CSS Editing Existing Project ................................................................................... 49
31 CC3200 CCS Creating Project........................................................................................... 50
32 CC3200 CCS Compiling Project ......................................................................................... 51
33 CC3200 CCS Compiling Project 1 ....................................................................................... 52
34 CC3200 CCS Compiling Project 2 ....................................................................................... 53
35 CC3200 CCS Linking Project 1 .......................................................................................... 54
36 CC3200 CCS Linking Project 2 .......................................................................................... 55
37 TI-RTOS OS Dependency ................................................................................................ 56
38 CC3200 CCS Generating Binary......................................................................................... 57
39 CC3200 CCS Executing 1 ................................................................................................ 58
40 CC3200 CCS Executing 2 ................................................................................................ 58
41 CC3200 CCS Launch Config............................................................................................. 59
42 Target Configuration ....................................................................................................... 60
43 CC3200 CCS Executing 4 ................................................................................................ 60
44 CC3200 CCS Executing 5 ................................................................................................ 61
45 Cygwin Setup ............................................................................................................... 62
46 Zadig Options............................................................................................................... 63
47 Replace Driver.............................................................................................................. 63
List of Figures
Submit Documentation Feedback
Copyright © 2014–2018, Texas Instruments Incorporated
List of Figures
3
www.ti.com
48 Editing common.h .......................................................................................................... 63
49 Output Screen .............................................................................................................. 64
50 Debugging wlan_station................................................................................................... 65
51 Tera Term VT............................................................................................................... 65
52 Device Manager ............................................................................................................ 66
4
List of Figures
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
1 Package Contents.......................................................................................................... 11
2 CC3200 Prerequisite....................................................................................................... 13
3 End of RAM ................................................................................................................. 68
4 ROM APIs................................................................................................................... 68
5 ROM Interrupts ............................................................................................................. 68
List of Tables
Submit Documentation Feedback
Copyright © 2014–2018, Texas Instruments Incorporated
List of Tables
5
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single

1 Introduction

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.1 Overview

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.2 Software 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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
Figure 2 illustrates the various software components and their form in the CC3200 Foundation SDK.
Introduction
Figure 2. CC3200 Software Components
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
7
Introduction

1.3 CC3200 LaunchPad Platform

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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com

2 Foundation SDK – Getting Started

This section familiarizes the user with installation process and the directory structure of CC3200 Foundation SDK.

2.1 Installation

Run the installer by double-clicking the CC3200 SDK installer.
Read and accept the license agreement to proceed.
Figure 4. CC3200 SDK Installation 1
Foundation SDK – Getting Started
Choose an appropriate path to place the package (else default is chosen).
Figure 5. CC3200 SDK Installation 2
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
9
Foundation SDK – Getting Started
Proceed with the installation and click Finish once done.
www.ti.com
Figure 6. CC3200 SDK Installation 3
10
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com

2.2 Package Components Overview

Directory Name Information docs
driverlib
example
• CC3200 Programmer’s Guide
• 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 Rx­filtering 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
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
11
Foundation SDK – Getting Started
Directory Name Information
Interrupt Application: Showcases the usage of interrupt DriverLib APIs. This is a sample application
I2C Demo: Showcases the usage of I2C DriverLib APIs. It provides a user interface to read-from or
MCU Sleep: Exercises the sleep functionality of the MCU.
uDMA Application: Showcases the usage of UDMA DriverLib APIs. Various DMA mode functionalities
FreeRTOS Demo Application: Showcases the FreeRTOS features, such as multiple task creation and
AES Demo Application: Showcases the usage of AES Driverlib APIs. Provides a user interface to
DES Demo Application: Showcases the usage of DES Driverlib APIs. Provides a user interface to
CRC Demo Application: Showcases the usage of CRC Driverlib APIs. Provides a user interface to
SHA-MD5 Demo Application: Showcases the usage of SHA-MD5 Driverlib APIs. Provides a user
ADC Demo Application: Showcases the functionality of the CC3200 ADC module by using the
PWM Demo Application: Showcases general 16-bit pulse-width modulation (PWM) mode feature
SD Host Application: Showcases the basic use case of initializing the controller to communicate with
SD Host FatFS Application: Uses the FatFS to provide the block-level read/write access to the SD
SPI Demo Application: Displays the required initialization sequence to enable the CC3200 SPI
Wi-Fi Audio App: Demonstrates bi-directional audio application on a CC3200 LaunchPad setup. This
Camera Application: Demonstrates the camera feature on the CC3200. The user can invoke the
example
UART DMA Application: Showcases use of UART, along with uDMA and interrupts.
Antenna Selection: Gives the option to select an antenna with more signal for APs using a web-
Out of Box Application: Demonstrates how the user can view different demo and SDK web links on
Peer to Peer Application: Demonstrates the Wi-Fi direct feature on the CC3200.
Timer Count Capture: Showcases the count capture feature of the timer to measure the frequency of
Idle Profile: Exercises hibernation using power management framework (middleware).
Sensor Profile: Exercises low power modes (LPDS) using Power Management Framework
Watchdog System Demo: Illustrates full system recovery using watchdog, including the network
TFTP Client: Demonstrates file transfer using TFTP (Trivial File Transfer Protocol). Requires a TFTP
WebSocket Camera: Demonstrates websocket HTTP server functionality by transmitting continuous
Application Bootloader: Showcases the secondary bootloader operations, to manage updates to
HTTP Client Demo: Illustrates the usage of the HTTP client library, to enable the device as an HTTP
Idle Profile (Non OS): Exercises the low power modes (LPDS) using power management framework in
MQTT Client: Showcases the device acting as a MQTT client in a fully-functional MQTT network.
MQTT Server: Showcases the device acting as an MQTT server capable of managing multiple local
Power Measurement: Allows the user to measure the current consumption for various low-power
www.ti.com
Table 1. Package Contents (continued)
to showcase interrupt preemption and tail-chaining capabilities.
write-to the I2C devices on the LaunchPad.
are shown in this application.
intertask communication using queues.
exercise various AES modes.
exercise various DES modes.
exercise various CRC modes.
interface to exercise various SHA-MD5 modes.
Driverlib APIs.
supported by purpose timers (GPTs).
the attached card, reading and writing SD card block.
card, using the SD host controller on the CC3200.
module in full duplex 4-wire master and slave modes.
application requires the audio boosterpack.
image capture command on the web browser hosting on the CC3200 device. This application requires the camera boosterpack.
browser.
their web-browser.
an external signal.
(middleware).
subsystem.
server running on a connected device such as a PC or smart phone.
JPEG frames to a websocket client. This application requires a camera boosterpack and a connected PC or smartphone with a browser supporting HTML 5.
application image.
client.
a non-OS environment.
clients, and allowing the local clients to communicate with remote MQTT clients.
modes.
12
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
Directory Name Information
example
Inc Oslib Middleware
NetApps
Simplelink Simplelink_extlib Documents Third_
party
Ti_rtos
Tools
FatFS FreeRT
OS
Foundation SDK – Getting Started
Table 1. Package Contents (continued)
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.3 Prerequisite: Tools to be Installed

Table 2. CC3200 Prerequisite
Tools Remarks Location Equipment
Computer Running Microsoft® Windows® 7 OS N/A
Development Environment
IAR IAR version 7.20 onwards must be installed. After the
Or/and
CCS CCS 6.1.1 version and TI v5.2.6 compiler version. After
CC3200 Support package in CCSv6.1
Or/and
GCC To enable CC3200 SDK development on a Linux
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.
environment.
Copyright © 2014–2018, Texas Instruments Incorporated
Installation:
http://www.iar.com/Products/IAR­Embedded-Workbench/ARM/
Installation:
http://www.ti.com/tool/ccstudio
Refer to Section 5.3.2.1
Refer to Section 5.3.3
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
13
Foundation SDK – Components
Table 2. CC3200 Prerequisite (continued)
Tools Remarks Location CC32xx PinMux Utility
CC32xx PinMux Utility.exe Utility to assign a desired personality to the general
purpose pins available at the CC3200 device boundary.
CC32xx Programmer Utility
Uniflash Tool to download firmware, application images, and
certificates to the CC3200 device.
Support Tools
HyperTerminal or Teraterm Serial communication tool to communicate over the
UART with the CC3200 device.
Iperf A useful tool for measuring TCP and UDP bandwidth
performance.
FTDI Driver FTDI 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.

3 Foundation 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
http://www.ti.com/tool/uniflash
tools\ftdi

3.1 SimpleLink Component Library

3.1.1 SimpleLink Modular Decomposition Figure 7. SimpleLink Modular Composition
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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
The following list enumerates the different components in the SimpleLink Framework:
Components Functionality 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.2 Using 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.
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
15
Foundation SDK – Components
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.3 Switch 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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
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.4 Development 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
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
17
Foundation SDK – Components
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.1 Relinking 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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
Figure 11. Edit Directory Path
3.1.4.2 Relinking to the SimpleLink Library in IAR
1. Compile the relevant debug configuration for the SimpleLink library.
2. Right-click on the application, and navigate to Options>Linker>Library.
3. Edit the SimpleLink library path as shown in Figure 12 and Figure 13.
Foundation SDK – Components
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
19
Foundation SDK – Components
www.ti.com
Figure 12. Edit SimpleLink Library Path
Figure 13. Edit SimpleLink Library Path
20
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
3.1.4.3 Relinking to the SimpleLink Library in GCC
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.2 Peripheral 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
Submit Documentation Feedback
CC3200 SimpleLink™ Wi-Fi®and IoT Solution, a Single Chip Wireless MCU
Copyright © 2014–2018, Texas Instruments Incorporated
21
Foundation SDK – Components
Pin_api
PRCM_Power_Reset_Clock_Module_api
Secure_Digital_Host_api
SHA_Secure_Hash_Algorithm_api
SPI_Serial_Peripheral_Interface_api
Systick_api
GPT_General_Purpose_Timer_api
UART_api
UDMA_Micro_Direct_Memory_Access_api
Utils_api
WDT_Watchdog_Timer_api
For detailed information on the APIs and their usage, refer to the document docs\CC3200 Peripheral Driver Library User's Guide.chm.

3.3 Reference 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.1 Network Reference Examples for the CC3200 LP
Application / Demo Description Peripheral/Feature exercised Getting started with wLAN
Station Getting started with wLANAPShowcases the device's capability as an AP in a typical
TCP Socket Application Showcases the device's communication over network using
WLAN Scan Policies Application
UDP Socket Application Showcases the device's communication over network using
SSL Demo Application Showcases SSL implementation on the CC3200 device. Networking (SSL) NWP Filter Application Showcases the Rx-Filter feature on the CC3200 device. Networking (MAC Filters) File Operations Application Showcases the file operation on the serial flash of the device. SFlash (File operations) Transceiver mode
Application
Provisioning - Smart Config Demonstrates how to associate and connect the
Hibernate Application Showcases hibernate as a power saving tool in a networking
Info Center-Get Time Application
Info Center-Get Weather Application
Email Application Sends 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
Copyright © 2014–2018, Texas Instruments Incorporated
Submit Documentation Feedback
Loading...
+ 51 hidden pages