SimpleLink CC3100/CC3200 Host Driver  Version 1.0.1.6
Simplifies the implementation of Internet connectivity
SimpleLink Driver

Introduction

The SimpleLink CC31xx/CC2xx family allows to add Wi-Fi and networking capabilities to low-cost embedded products without having prior Wi-Fi, RF or networking expertise. The CC31xx/CC32xx is an ideal solution for microcontroller-based sensor and control applications such as home appliances, home automation and smart metering. The CC31xx/CC32xx has integrated a comprehensive TCP/IP network stack, Wi-Fi driver and security supplicant leading to easier portability to microcontrollers, to an ultra-low memory footprint, all without compromising the capabilities and robustness of the final application.

Module Names

To make it simple, TI's SimpleLink CC31xx/CC32xx platform capabilities were divided into modules by topic (Silo). These capabilities range from basic device management through wireless network configuration, standard BSD socket and much more. Listed below are the various modules in the SimpleLink CC31xx/CC32xx driver:

  1. Device - controls the behaviour of the CC31xx/CC32xx device (start/stop, events masking and obtaining specific device status)
  2. Wlan - controls the use of the WiFi WLAN module including:
    • Connection features, such as: profiles, policies, SmartConfig™
    • Advanced WLAN features, such as: scans, rx filters and rx statistics collection
  3. Socket - controls standard client/server sockets programming options and capabilities
  4. Netapp - activates networking applications, such as: HTTP Server, DHCP Server, Ping, DNS and mDNS.
  5. Netcfg - controls the configuration of the device addresses (i.e. IP and MAC addresses)
  6. FileSystem - provides file system capabilities to TI's CC31XX that can be used by both the CC31XX device and the user.

Porting Guide

The porting of the SimpleLink driver to any new platform is based on few simple steps. This guide takes you through this process step by step. Please follow the instructions carefully to avoid any problems during this process and to enable efficient and proper work with the device. Please notice that all modifications and porting adjustments of the driver should be made in the user.h header file only. Keep making any of the changes only in this file will ensure smoothly transaction to new versions of the driver at the future!

Step 1 - Create your own user.h file

The first step is to create a user.h file that will include your configurations and adjustments. You can use the empty template provided as part of this driver or you can choose to base your file on file from one of the wide range of examples applications provided by Texas Instruments

Step 2 - Select the capabilities set required for your application

Texas Instruments made a lot of efforts to build set of predefined capability sets that would fit most of the target application. It is recommended to try and choose one of this predefined capabilities set before going to build your own customized set. If you find compatible set you can skip the rest of this step.

The available sets are:

  1. SL_TINY - Compatible to be used on platforms with very limited resources. Provides the best in class foot print in terms of Code and Data consumption.
  2. SL_SMALL - Compatible to most common networking applications. Provide the most common APIs with decent balance between code size, data size, functionality and performances
  3. SL_FULL - Provide access to all SimpleLink functionalities

Step 3 - Bind the device enable/disable output line

The enable/disable line (nHib) provide mechanism to enter the device into the least current consumption mode. This mode could be used when no traffic is required (tx/rx). when this line is not connected to any IO of the host this define should be left empty. Not connecting this line results in ability to start the driver only once.

Step 4 - Writing your interface communication driver

The SimpleLink device support several standard communication protocol among SPI and UART. Depending on your needs and your hardware design, you should choose the communication channel type. The interface for this communication channel should include 4 simple access functions:

  1. open
  2. close
  3. read
  4. write

The way this driver would be implemented is directly effecting the efficiency and the performances of the SimpleLink device on this platform. If your system has DMA you should consider to use it in order to increase the utilization of the communication channel If you have enough memory resources you should consider using a buffer to increase the efficiency of the write operations.

Step 5 - Choose your memory management model

The SimpleLink driver support two memory models:

  1. Static (default)
  2. Dynamic

If you choose to work in dynamic model you will have to provide alloc and free functions to be used by the Simple Link driver otherwise nothing need to be done.

Step 6 - OS adaptation

The SimpleLink driver could run on two kind of platforms:

  1. Non-Os / Single Threaded (default)
  2. Multi-Threaded

If you choose to work in multi-threaded environment under operating system you will have to 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 additional the driver support running without dedicated thread allocated solely to the simple link driver. If you choose to work in this mode, you should also supply a spawn method that will enable to run function on a temporary context.

Step 7 - Set your asynchronous event handlers routines

The SimpleLink device generate asynchronous events in several situations. These asynchronous events could be masked. In order to catch these events you have to provide handler routines. Please notice that if you not provide a handler routine and the event is received, the driver will drop this event without any indication of this drop.

Step 8 - Run diagnostic tools to validate the correctness of your porting

The driver is delivered with some porting diagnostic tools to simplify the porting validation process and to reduce issues latter. It is very important to follow carefully this process.

The diagnostic process include:

  1. Validating Interface Communication Driver
  2. Validating OS adaptation layer
  3. Validating HW integrity
  4. Validating basic work with the device

License

Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.