SimpleLink SDK TI 15.4 Stack Plugin Users Guide

Table of Contents

Introduction

The SimpleLink™ SDK TI 15.4 Stack Plugin is a companion software package that enables the use of a SimpleLink CC1310 Sub-1Ghz radio running the TI 802.15.4 stack on any standard SimpleLink MCU platform including the MSP432P4, MSP432E4, and CC3220 families. By having the ability to seamlessly and modularly add TI 15.4 stack functionality to an embedded system, a programmer can enable their embedded device to become a gateway to IoT connectivity.

This plugin leverages the use of a standard Network Processor Interface for inter-MCU communication between the host and the CC1310 MAC CoProcessor. Through a simple porting layer interaction with the MAC CoProcessor is abstracted out to enable code compatibility between a one chip CC32xx solution and a two chip MCU + CC1310 solution. A UART connection is used by the SimpleLink host microcontroller to manipulate and configure all aspects of the 15.4 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 SimpleLink MSP432P4 SDK, SimpleLink MSP432E4 SDK, and the SimpleLink CC3220 SDK. It relies heavily on several core elements within these SDKs. Without a prior installation of a supported SimpleLink SDK, the SimpleLink SDK TI 15.4 Stack Plugin will not work. While testing of this software package was performed on release 2.20.00.xx of the supported SimpleLink SDKs, it is likely that it will also work with newer 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 MAC CoProcessor used in this plugin is the SimpleLink CC1310. Specifically, the CC1310 LaunchPad 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 Sub-1Ghz communication.

The communication between the host MCU and the C1310 has been abstracted away using the Network Processor Interface driver layer, which sits above the API_MAC interface on the MCU. While the API_MAC interface is identical to what you would see in the CC13x0 SDK, the NPI translates all of the high level API_MAC calls to a physical UART layer that communicates with the CC1310 as a black box solution, simplifying programming and maximizing portability. This allows for the programmer to make API_MAC calls (such as ApiMac_init, ApiMac_mcpsDataReq, etc.) as they would on a CC1310. A brief block diagram of the various software connections and driver interworkings can be seen below:

The physical interface between the host SimpleLink MCU and the CC1310 is a simple RX+TX UART connection. The physical hardware specification and interworkings are explained in detail in the TI 15.4 Stack CoP Interface 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.

With the API_MAC layer being fully supported by the plugin, porting applications from the CC1310 SDK to the plugin is simple. In the CC1310 SDK, each API_MAC function interacts directly with the TI 15.4 stack through the use of the ICall layer. With the plugin, each API_MAC function generates a message that is passed to the TI 15.4 stack through the NPI layer. Thus, porting a TI 15.4 stack application from the CC1310 SDK to the plugin is as simple as removing any CC1310 hardware-specific functions, removing the ICall layer as well as all other direct MAC interaction layers, and then switching the API_MAC implementation with the plugin’s NPI-supporting API_MAC code. The plugin includes an example of the porting process through the TI 15.4 collector example provided.

Folder Structure

The folder structure for the SimpleLink SDK TI 15.4 Stack 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 NPI porting layer to interact with and control the CC1310 Sub-1Ghz 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.

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 CC1310

It will become necessary for the user to update the application running on the CC1310 to configure it as a TI 15.4 MAC CoProcessor. Furthermore, the application needed is different between the MSP432 family and the CC3220 family of processors due to differences in the LaunchPad pin layouts. The specific coprocessor firmware image used in the validation and verification of each plugin release is stored in the tools/cc13xx_tools/cc1310_cop_firmware folder of the plugin installation folder. Note that these binaries can be built from the coprocessor_cc1310lp project included in the SimpleLink CC13x0 SDK.

The sections below describe how to update the firmware on a CC1310 LaunchPad using a direct USB connection.

Uniflash

The simplest way to update the user files on the CC1310 is to use the Uniflash Image Creator. Uniflash is a unified utility used to program the on-chip flash memory on TI’s line of SimpleLink MCUs.

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, plug the USB cable from your computer into the micro USB port of the CC1310 Launchpad. Ensure that the CC1310 Launchpad has the jumper settings as shown in the following image:

Once connected, open up the UniFlash application. In the device list, select CC1310:

Once selected, click Start. On the next screen there will be a simple interface, with buttons to browse for and flash an image onto the CC1310. First, click on Browse and select the appropriate binary in the tools/cc1310_tools/cc1310_cop_firmware/ directory:

For use with the CC3220 family, select cc3220_coprocessor_cc1310lp.hex. For use with the MSP432 family, select msp432_coprocessor_cc1310lp.hex.

The two images are identical other than the UART pins selected for use in the NPI layer.

Once you have selected the correct image, press the Load Image button.

During the process, Uniflash might prompt you to update the device. Allow it to update, and once the flashing is complete, the CC1310 is ready to be used as a Sub-1GHz TI 15.4 MAC CoProcessor.

Creating an IBM Cloud Account

1) Go to the IBM Bluemix account at https://console.bluemix.net/registration/ and register for a free 30 day trial account.

2) Confirm the Bluemix account using the link provided by IBM through email.

3) Log into the Bluemix account and walk through the steps on the screen.

4) Once on the dashboard, click on the Catalog tab on the top-right corner.

IBM1

5) Select Internet of Things under Platform on the left menu, and then select Internet of Things Platform.

IBM2

6) Leave the default or enter a name for the Service name. Choose the Lite Pricing Plan to use the 30-day free trial. Then click on Create at the bottom of the page.

IBM3

7) Click on the IBM Cloud logo on the upper left to go to the Dashboard screen, or click on the drop-down menu and choose Dashboard.

IBM4

8) The cloud foundry apps and IoT services will be visible on the Dashboard. Click on the IoT service you created in Step 6.

IBM5

9) Under the Manage tab, click on the Launch button.

IBM6

10) Select Devices from the navigation bar on the left, and then select Add Device in the top right.

IBM7

11) On the Identity tab, enter a Device Type and Device ID. These need to be consistent with the DEVICE_TYPE and DEVICE_ID macros that are defined in the example project in mqtt_client_app.c. The default value for DEVICE_TYPE is gateway and the default value for DEVICE_ID is gatewayDeviceID. Select Next.

IBM8

12) On the Device Information tab, ignore the metadata information and press Next again.

IBM9

13) On the Security tab, fill out the Authentication Token field. Make note of this token, as this will be used for authenticating the device to the cloud. Select Next.

IBM10

14) On the Summary tab, verify that you have entered the correct information. You may want to take a screenshot or make a note of the Authentication Token, as this will be the last time the Authentication Token will be visible. Select Done.

IBM11

Serial Port Logging/Debugging

Note that for logging/debugging messages the back channel serial port of the LaunchPad is used. In order to read these messages, use your favorite serial terminal program (such as Tera Term or PuTTY). The COM port number will be different depending on the system configuration, however it should show up as XDS110 Class Application/User UART.

Make sure to use the Application/User UART and not the Auxiliary Data Port. Along with the COM port of the XDS110 UART, the back channel UART defaults to the following serial port values:

Code Examples

15.4 Collector – Example implementation of TI 15.4 Collector networking with 15.4 nodes

IDE/Software Configurations

This software package supports and has been tested with TI Code Composer Studio 7.3 as well as IAR Embedded Workbench for ARM v8.11.3. The GCC toolchain for ARM has also been tested within CCS. Both FreeRTOS and TI-RTOS are fully supported in this release.

Code Composer Studio Project Guide

The SimpleLink SDK TI 15.4 Stack Plugin is designed to integrate seamlessly with the Code Composer Studio Integrated Development Environment from Texas Instruments. After installing the plugin (it is recommended to use the default installation directory), CCS should automatically detect and install the plugin software package without any special interaction from the user. To check to see if the plugin has installed correctly, go to the Windows->Preferences menu item. Under the Code Composer Studio->Products item you should see “SimpleLink SDK TI 15.4 Stack Plugin” installed (with a version number):

Note that the installation path of the plugin needs to be present in the Product Discovery Path:

IAR Embedded Workbench Project Guide

IAR Embedded Workbench is fully supported under the SimpleLink SDK TI 15.4 Stack Plugin ecosystem. Setting up your development environment to work with IAR involves pointing IAR to the plugin and SDK directories as mentioned below.

To get started, a list of external variables needs to be imported in IAR in order to let the IDE know the paths for all of the relevant software installations. An example configuration file that uses the default paths can be found in the tools/iar/simplelink_sdk_wifi_plugin.custom_argvars file of the SimpleLink SDK TI 15.4 Stack Plugin installation directory. This file might have to be changed depending on specific installation paths and version numbers; however it should work if the user chose to use the default installation paths (note the version numbers might slightly vary from the picture below):

To import this file into your IAR IDE, navigate to Tools->Configure Custom Argument Variables.

From here, click the “Global” tab and navigate to the directory where the custom_argvars file is stored (by default in the tools/iar/ directory of the installation path). Note that there are three separate sets of custom_argvars- those for the MSP432E4, MSP432P4, and CC3220. It is important to only enable the set of custom argvars corresponding to the device being used. Otherwise, unpredictable behavior can result.

After importing this file the custom variables will show up in the text box in the middle of the screen. Click OK to closeout and save the dialog. Note that these custom variables need only be imported once and the settings will persist.

Once the external symbols have been imported you can either open the project manually on the file system or use IAR’s built-in example project explorer. To open the project manually, simply go to File->Open->Workspace: Navigate to the example project’s eww file. For example, the MSP432E401Y’s eww file would be located at:

install_directory/examples/rtos/MSP_EXP432E401Y/demos/collector/tirtos/iar/collector.eww

Once you have opened the workspace in IAR you are able to download and debug the program as you would any other IAR project.

Note that if you upgrade or change versions of the SimpleLink SDK TI 15.4 Stack Plugin or the base SDK, the external tools variables will have to change to point to the correct version of the software.

Support

Please post on the MSP432 E2E Forum for device support questions.