Texas Instruments CC3220, CC3220S, CC3220SF Getting Started Manual

CC3220 SimpleLink™ Wi-Fi®and Internet of Things Solution, a Single-Chip Wireless MCU
Getting Started Guide
Literature Number: SWRU461B
February 2017–Revised June 2018
Contents
Preface ........................................................................................................................................ 3
1 Download and Installation..................................................................................................... 4
1.1 CC3220 Software Development Kit (SDK) ............................................................................... 4
1.2 Service Pack ................................................................................................................. 4
1.3 UniFlash Tool................................................................................................................. 4
1.4 Serial Terminal ............................................................................................................... 6
1.5 Pin Mux Tool ................................................................................................................. 7
1.6 XDS110 Driver Installation.................................................................................................. 7
1.7 Debugger/IDE............................................................................................................... 10
1.7.1 CCS................................................................................................................. 10
1.7.2 IAR .................................................................................................................. 12
1.7.3 GCC................................................................................................................. 12
1.8 Operating Systems......................................................................................................... 12
1.8.1 TI-RTOS............................................................................................................ 12
1.8.2 FreeRTOS.......................................................................................................... 12
2 Execute your First Application............................................................................................. 13
2.1 CCS.......................................................................................................................... 14
2.1.1 Import and Configure Project.................................................................................... 14
2.1.2 Recompilation for Other Device Variants ...................................................................... 17
2.2 IAR ........................................................................................................................... 17
2.3 GCC.......................................................................................................................... 17
2.4 Download the Application ................................................................................................. 18
2.4.1 Image Creation for Secure Device (CC3220S and CC3220SF)............................................ 22
2.4.2 Image Creation for Nonsecure Device (CC3220)............................................................. 27
2.5 Launching the Application................................................................................................. 29
2.6 Using the Application ...................................................................................................... 30
3 Use the Debugger/IDE......................................................................................................... 34
3.1 Prerequisites................................................................................................................ 34
3.2 Development Formatting for SFLASH................................................................................... 34
3.3 CCS.......................................................................................................................... 35
3.3.1 Rebuild the SimpleLink™ Library for Debug Configuration.................................................. 35
3.3.2 Download and Debug the WLAN Station Example ........................................................... 36
3.4 IAR ........................................................................................................................... 39
3.5 GCC.......................................................................................................................... 39
Revision History.......................................................................................................................... 40
2
Contents
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
This guide is intended to assist users in the initial setup and demonstration of running their first sample application for the CC3220, CC3220S, and CC3220SF SimpleLink™ Wi-Fi®and Internet of Things Solution, a Single-Chip Wireless MCU from Texas Instruments™. The guide explains how to install the software development kit (SDK) and various other tools required to get started with the first application.
Trademarks
SimpleLink, Texas Instruments, Code Composer Studio are trademarks of Texas Instruments. Bluetooth is a registered trademark of Bluetooth SIG. IAR Embedded Workbench is a registered trademark of IAR Systems AB. Linux is a registered trademark of Linux Foundation. Microsoft is a registered trademark of Microsoft Corporation. Wi-Fi is a registered trademark of Wi-Fi alliance. All other trademarks are the property of their respective owners.
Introduction
This preliminary release of the Getting Started guide is focused on the Code Composer Studio™ (CCS) IDE.
For detailed IAR instructions, refer to:
<sdk-installation-path>\docs\cc3220\CC3220_SDK_IAR_project_setup_guide.html
GCC is currently not supported. The CC3220 device is part of the SimpleLink microcontroller (MCU) platform, which consists of Wi-Fi,
Bluetooth®low energy, Sub-1 GHz, and host MCUs. All share a common, easy-to-use development
environment with a single core software development kit (SDK) and rich tool set. A one-time integration of the SimpleLink platform lets you add any combination of devices from the portfolio into your design. The ultimate goal of the SimpleLink platform is to achieve 100 percent code reuse when your design requirements change. For more information, visit www.ti.com/simplelink.
Read This First
SWRU461B–February 2017–Revised June 2018

Preface

Prerequisites
The user is expected to have the following:
CC3220S-LAUNCHXL or CC3220SF-LAUNCHXL
An 802.11b/g/n (2.4-GHz) Wireless Access Point (AP)
A computer running Microsoft®Windows 7
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Preface
3

1.1 CC3220 Software Development Kit (SDK)

Download the following software at CC3220 SDK package.
Run the installer by double-clicking on the CC3220 SDK installer.
Read and accept the license agreement to proceed.
Choose the desired path to place the package (else default is chosen).
Proceed with the installation and click Finish once done.

1.2 Service Pack

If the board is not already flashed with the service pack for SDK <version>, the latest service pack for SDK <version> must be flashed on the CC3220 wireless MCU. The most updated service pack is available under <sdk-installation>\tools\cc32xx_tools\servicepack-cc3x20. To program the service pack with an UniFlash, the binary file (.bin) must be loaded to the Files/Service Pack.

1.3 UniFlash Tool

UniFlash is a stand-alone tool used to program on-chip flash memory on TI MCUs and onboard flash memory for Sitara processors. The tool lets the developer download application image, service pack, and other files on the serial flash of the CC3220 device. It also enables the creation of OTA (Over-The-Air) images.
1. Download the Image Creator tool from http://www.ti.com/tool/uniflash.
2. Run the installer by double-clicking on it. Click Next to continue, as shown in Figure 1-1.
Chapter 1
SWRU461B–February 2017–Revised June 2018

Download and Installation

Figure 1-1. Install UniFlash
4
Download and Installation
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
3. Choose the desired path in the Installation Directory field to place the package as shown in
UniFlash Tool
Figure 1-2, else the default is chosen.
Figure 1-2. Select Install Path
4. Proceed with the installation, and when done click Finish as shown in Figure 1-3.
Figure 1-3. Complete Installation
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Download and Installation
5
Serial Terminal

1.4 Serial Terminal

Many sample applications come with UART support for printing the debug information or the status of any operation. Some applications require user’s input through UART, so it is advised to install a serial terminal application. Tera Term is used for demonstration here.
1. Download Tera Term and install as described in the instructions.
2. Run the Tera Term application.
3. Select the Serial Port, then COM11: XDS110 Class Application/User UART (COM11), as shown in
Figure 1-4. Click OK to continue.
NOTE: Install the XDS110 drivers for the PC to enumerate these ports for serial terminal. See
Section 1.6 for installation of the XDS110 drivers.
www.ti.com
Figure 1-4. Select Serial Port
4. Go to Setup Serial port, as shown in Figure 1-5.
Figure 1-5. Set up Serial Port
6
Download and Installation
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
5. Configure the setting as shown in Figure 1-6. Click OK to continue.
Pin Mux Tool
Figure 1-6. Configure Settings

1.5 Pin Mux Tool

TI recommends installing the Pin Mux Tool, although it is not required to get started with your sample application. This tool helps to configure the pin mux setting for your application. All the provided sample applications already contain the required pin mux file (output of this tool). The latest version of this tool can be downloaded from http://www.ti.com/tool/PINMUXTOOL. For more information on this tool, see
http://processors.wiki.ti.com/index.php/TI_PinMux_Tool_v4.
For older versions of this tool, the CC3220 device may not be listed explicitly under the supported devices. If that is the case, choose the CC3200 device from the drop-down menu to generate the same output files required by the CC3220 device.

1.6 XDS110 Driver Installation

XDS110 drivers must be installed before one can use the debugger or the Image Creator tool. It also enumerates the serial terminal port, which can be used to print the debug messages over UART. The XDS drivers can be obtained from the
http://processors.wiki.ti.com/index.php/XDS_Emulation_Software_Package#XDS110_Reset_Download.
Do the following steps for the installation.
1. Run the installer in administrator mode and click Next, as shown in Figure 1-7.
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Download and Installation
7
XDS110 Driver Installation
www.ti.com
Figure 1-7. Set up XDS110
2. Read and accept the License Agreement and click Next, as shown in Figure 1-8.
Figure 1-8. License Agreement
8
Download and Installation
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
3. Specify the installation path in the Installation Directory field, as shown in Figure 1-9 (default is C:\ti),
XDS110 Driver Installation
and proceed with the installation.
Figure 1-9. Select Install Path
4. Click Finish when installation is done, as shown in Figure 1-10.
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Figure 1-10. Complete Installation
Download and Installation
9
Debugger/IDE

1.7 Debugger/IDE

The following debugger/IDE can be used to download and debug the application image.

1.7.1 CCS

The latest CCS installer can be downloaded from http://www.ti.com/tool/ccstudio. CCS is a free tool from TI, lets developers work with various TI devices. The SDK supports CCS version 7.0 or later.
1. Double-click on the installer and follow the instruction to install this tool
2. Make sure to select the SimpleLink Wireless MCUs option for processor support, as shown in Figure 1-
11. Click Next to continue.
NOTE: If CCS is already installed for other processors (and not for SimpleLink wireless MCU), then
the installer must run again and select the SimpleLink Wireless MCUs option for processor support this time. The rest of the installation steps will remain the same as for a new installation:
www.ti.com
10
Download and Installation
Figure 1-11. Set up CCS
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
www.ti.com
1.7.1.1 CCS Linux Patch for CC3220 Device Variants
In case the Linux®version of CCS is being used and the CC3220 variant is not listed within the target devices, the following patch should be applied:
1. Copy the content of the <sdk-installation-path>\tools\ccs_patch\ccs\ folder into <ccs_installation_dir>\ccs_base.
2. Click to merge the folders with existing ones when prompted.
3. If working with a 64-bit version of CCS on Linux, delete the libFlashCC3220SF.so file in the
<ccs_installation_dir\ccs_base\DebugServer\bin\ folder and rename libFlashCC3220SF_64bit.so to libFlashCC3220SF.so.
The future version of CCS might not need this patch. See the Release Notes (in html format) inside <sdk-installation-path>.
After successful patching, the device variant would be listed for CCS, as shown in Figure 1-12.
Debugger/IDE
Figure 1-12. Device Variant for CCS
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Download and Installation
11
Debugger/IDE

1.7.2 IAR

The developer is responsible for buying the license for the IAR Embedded Workbench®tool. A trial version can be downloaded from https://www.iar.com/iar-embedded-
workbench//#!?device=CC3220&architecture=ARM.
Double-click on the installer and follow the instruction to install this tool. For detailed IAR setup instruction, see <sdk-installation-path>\docs\simplelink_mcu_sdk\Quick_Start_Guide.html.

1.7.3 GCC

For detailed GCC setup instruction, please refer to <sdk-installationpath>\ docs\simplelink_mcu_sdk\Quick_Start_Guide.html

1.8 Operating Systems

The CC3220 SDK currently supports TI-RTOS and FreeRTOS. Each real-time kernel port consists of three files that contain the core kernel components and are common to every port, and one or more files that are specific to a particular microcontroller and/or compiler. Each directory contains files specific to a particular compiler (CCS, GCC, and IAR).

1.8.1 TI-RTOS

TI-RTOS for SimpleLink solutions is already installed in the latest CCS releases (see Section 1.7.1). IAR users can install the TI-RTOS Support Package as a separate installer (see below).
www.ti.com
1.8.1.1 Install TI-RTOS as a Separate Installer
The latest TI-RTOS support package for SimpleLink devices can be downloaded and installed from
http://www.ti.com/tool/ti-rtos.

1.8.2 FreeRTOS

The following are the instructions to add the FreeRTOS support.
1. Download FreeRTOS official version 9 from
https://sourceforge.net/projects/freertos/files/latest/download?source=files.
2. Install the software under C:/
3. Copy the content of the patch (CCS, GCC, and IAR folders), and paste it at C:/FreeRTOSv9.0.0/FreeRTOS/Source/portable.
4. Modify the FreeRTOS directory name from FreeRTOSv9.0.0 to FreeRTOSv9.0.0a
For IAR users, there is a manual fix that need to be done on top of the project , please change the following:
1. Right click on the project.
2. Select Linker from the category on the left.
3. Go to the Library tab.
4. Select the checkbox Override default program entry
5. Select Entry symbol and enter resetISR in the text box.
12
Download and Installation
Copyright © 2017–2018, Texas Instruments Incorporated
Submit Documentation Feedback
Chapter 2
SWRU461B–February 2017–Revised June 2018

Execute your First Application

The SDK supports the following device variants:
CC3220 – Base variant
CC3220S – CC3220 + MCU security
CC3220SF – CC3220S + internal flash
The SDK is packed with precompiled binaries for several networking and peripheral examples. By default, the sample applications are built for the CC3220SF variant. The user can easily compile the same applications for the other variants just by selecting them in the project properties. See Section 2.1 to compile the sample application for the required device variant.
This document uses Network Terminal as the reference application. The Network Terminal application provides a CLI (command line interface over UART connection) that lets users activate basic SimpleLink operations such as triggering a WLAN scan, connecting to a local access point (or setting an access point or Wi-Fi-Direct connection), and performing networking services such as PING, MDNS, or data transfer over TCP/UDP sockets. The application also enables configuration of Wake-On-WLAN filters and scan policy and lets the user put the device in a transceiver mode for testing TX and RX operations.
This example uses a real-time operating system (TI-RTOS or FreeRTOS). The following instructions will use the CC3220SF device and TI-RTOS, but can be easily changed to other combination, by:
Selecting the CC3220S device-specific directory (CC3220S_LAUNCHXL instead of CC3220SF_LAUNCHXL)
or
Selecting sample project for FreeRTOS (for example, network_terminal_CC3220SF_LAUNCHXL_freertos_ccs instead of network_terminal_CC3220SF_LAUNCHXL_tirtos_ccs)
Submit Documentation Feedback
Copyright © 2017–2018, Texas Instruments Incorporated
Execute your First Application
13
Loading...
+ 28 hidden pages