SimpleLink SDK Wi-Fi Plugin Users Guide

Table of Contents

Introduction

The SimpleLink™ SDK Wi-Fi Plugin is a companion software package that enables the use of a Wi-Fi radio on any standard MSP432 platform including the MSP432P401, MSP432P4111, and MSP432E401 families, as well as on the CC26X2R platform, including the CC2642R and CC2652R family of devices. By having the ability to seamlessly and modularly add Wi-Fi functionality to an embedded system, a programmer can enable their embedded device to become a gateway to various IOT infrastructures.

This plugin leverages the use of the Wi-Fi host driver that is standard within the SimpleLink CC32xx SDK. Through a simple porting layer interaction with the network processor (NWP) is abstracted out to enable code compatibility between a one chip CC32xx solution and a two chip host microcontroller + CC31xx solution. A SPI connection is used by the host microcontroller to manipulate and configure all aspects of the Wi-Fi network processor.

SimpleLink SDK Plugins are designed to work in tandem to the microprocessor specific SDK. This plugin is designed to work alongside both the the SimpleLink MSP432P4 SDK, SimpleLink MSP432E4 SDK, and SimpleLink CC26X2 SDK. It relies heavily on several core elements within these SDKs. Without a prior installation of the SimpleLink SDK, the SimpleLink SDK Wi-Fi Plugin will not work. While testing of this software package was performed on release 2.30.00.xx of the SimpleLink SDKs, it is likely that it will also work with newer and older versions.

Plugin Architecture / General Overview

All of the code examples written for this software package leverage a combination of various host controller LaunchPads. The supported host microcontroller LaunchPad configurations are listed below:

The network processors that can be used in this plugin as the main vessel of communication are listed below:

A BoosterPack is used in conjunction with the host LaunchPad to provide the benefits of a full capability host microcontroller coupled with the modularity of a separate network processor for Wi-Fi communication.

The communication between the host and the C31xx has been abstracted away using a simple porting layer that sits above the Wi-Fi host driver on the host microcontroller. While the underlying host driver is identical to what you would see in the CC32xx SDK, the porting layer translate all of the high level Wi-Fi calls to a physical SPI layer that communicates with the CC31xx as a black box solution. This allows for the programmer to call SimpleLink Wi-Fi APIs (such as sl_Start, sl_Fs, etc.) calls as they would on a CC3220. A brief block diagram of the various software connections and driver interworkings can be seen below:

WiFi Layers

The physical interface between the host and the CC31xx is a simple SPI connection with two interrupt lines for synchronization and power management added. The physical hardware specification and interworkings are explained in detail in the CC3120 BoosterPack User’s Guide. It is important to note that while the default pin configurations used in the example projects in this plugin package are mapped to the LaunchPad pins, they are fully reconfigurable to match the end application requirements. Reconfiguring the pin configurations and SPI driver parameters is explained in detail in the Customizing Parameters section of this document.

Folder Structure

The folder structure for the SimpleLink SDK Wi-Fi Plugin is made to compliment the standard folder structure that the platform SDK adheres to. From the root directory, the following folders are available:

The source/ folder contains the code that is likely to end up seeing its way into an end application. Within there is the following folders:

The ti/ folder contains the bulk to the TI provided collateral to interact with and control the CC31xx Wi-Fi Device. This folder is structured as follows:

The entirety of code provided by TI is provided as an open source BSD license and generally include both prebuilt static libraries for each supported IDE as well as full source code. The ota folder does not contain prebuilt libraries as much of the ota implementation is dependent on end user requirements and parameters.

The third_party/ folder contains the mbedtls library that is used by the MSP432 for SHA256 generation in lieu of a hardware SHA256 module (that the CC3220 contains).

Back in the root directory, the tools/ folder consists of the following two folders:

The cc31xx_tools/ directory contains various collateral needed to enable functionality of various functions. This includes the following subdirectories:

Updating the CC31xx (Service Pack and User Files)

It will become necessary for the user to update both the user files stored on the CC31xx’s flash storage and the service pack running on the CC31xx itself. User files that need to be updated can range from specific application-centric files required for operation (such as html pages) to updated certificates and trusted root certificate files.

The service pack updates are done on a regular basis to patch fixes for the services running on the NWP as well as to ensure that the NWP is running with the most up-to-date security patches. It is the same process to program the CC3120 and the CC3135, with the only differences being that the user needs to ensure that the correct service pack and Device Type are chosen for the specific device.

The CC3120 and the CC3135 use different servicepacks, but the same user files.

The service pack for the CC3120 is located in the plugin in tools/cc31xx_tools/servicepack-cc3x20. This is identical to the service pack distributed in the CC32xx SDK in tools/cc32xx_tools/servicepack-cc3x20.

The service pack for the CC3135 is located in the plugin in tools/cc31xx_tools/servicepack-cc3x35. This is identical to the service pack distributed in the CC32xx SDK in tools/cc32xx_tools/servicepack-cc3x35.

The sections below describe not only how to update the service pack and user files running on the CC31xx via a direct USB connection, but also how to use over-the-air updates (OTA) to dynamically load a customized update package via the device’s Wi-Fi connection.

Uniflash / CC31XXEMU-BOOST

The most common and obvious way to update the user files on in CC31xx is to use the C31XXEMUBOOT BoosterPack along with Uniflash’s Image Creator. The C31XXEMUBOOST is a specialized BoosterPack that connects on top of the CC31xx BoosterPack to program and update the user files stored on the CC31xx’s flash memory. Uniflash has a specific utility (called Image Creator) that is used to communicate with the CC31XXEMU boost and create/manage software packages.

To get started first download the latest Uniflash package from the the link below:

https://processors.wiki.ti.com/index.php/Category:CCS_UniFlash

Next, connect the CC31XXEMUBOOST to the CC31xx BoosterPack as seen below while being careful not to mount the pins upside down.

WiFi Layers

Note that while connected to the CC31XXEMUBOOST, the normal programming of the MSP432 LaunchPad will not work correctly. Also note that it is not required for the CC31xx to be connected to the MSP432 when programming with the CC31XXEMUBOOST.

Plug the USB cable from your computer into the right USB port of the CC31XXEMUBOOST (as seen above).

Once connected, open up the UniFlash application. In the device list, scroll down (to the very bottom) and select CC31xx/CC32xx.

WiFi Layers

Once selected, click Start Image Creator to start the image creator application. This will start the SimpleLink Wi-Fi Image Creator. On this screen you can manage various project settings as well as program external images. To get started, clock on the New Project button as seen below.

WiFi Layers

On the next screen fill out a project name of your choice. Make sure that you choose the BoosterPack that you are using (CC3120 or CC3135) as the Device Type and make sure that the Device Mode is set to Develop. Develop mode allows the user to open up the filesystem and make changes via Uniflash during the development phase. When you wish to secure your device and program it for production the Production mode should be used.

WiFi Layers

On the next screen you will see the new project page as it exists for Development Mode. In Development Mode you can change and manipulate all aspects of the CC31xx device. At a minimum when creating an image to flash on the CC31xx, it is recommended to start with specifying a service pack. The service pack provides various patches and security fixes for the NWP image running on the CC31xx. To specify a service pack select the Service Pack menu item on the left.

WiFi Layers

On the next page click browse next to the file name field and navigate to the service pack release that is included with the SimpleLink SDK Wi-Fi plugin release. The file name generally starts with sp_ and ends with .bin.

Important Note: Ensure that you are using the correct service pack for your device.

The service pack for the CC3120 can be found at: /tools/cc31xx_tools/servicepack-cc3x20. The service pack for the CC3135 is located in the plugin in tools/cc31xx_tools/servicepack-cc3x35.