SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The CC3x20, CC3x35, and CC3x30 devices are part of the SimpleLink™ microcontroller (MCU) platform which consists of Wi-Fi®, Bluetooth® low energy, Sub-1 GHz and host MCUs, which 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 enables you to add any combination of the portfolio’s devices into your design, allowing 100 percent code reuse when your design requirements change. For more information, visit www.ti.com/simplelink.
The SimpleLink™ Wi-Fi®Internet-on-a chip™ family of devices from Texas Instruments™ provides a suite of integrated protocols for Wi-Fi® and Internet connectivity to dramatically simplify the implementation of Internet-enabled devices and applications.
This document provides software (SW) programmers with all of the required knowledge for working with the networking subsystem of the SimpleLink™ Wi-Fi® devices. This guide provides basic guidelines for writing robust, optimized networking host applications, and describes the capabilities of the networking subsystem. The guide contains some example code snapshots to give users an idea of how to work with the host driver. More comprehensive code examples can be found in the formal software development kit (SDK). This guide does not provide a detailed description of the host driver APIs.
SimpleLink, Internet-on-a chip, Texas Instruments, SmartConfig, and are trademarks of Texas Instruments Incorporated.
Wi-Fi and Wi-Fi Direct are registered trademarks of Wi-Fi Alliance.
Bluetooth is a registered trademark of Bluetooth SIG, Inc.
Arm and Cortex are registered trademarks of Arm Limited.
Google is a registered trademark of Google, Inc.
All other trademarks are the property of their respective owners.
This chapter gives a brief introduction to the networking subsystem, lists the key features of the device, and provides an overview of the host driver.
The SimpleLink™ Wi-Fi® family of devices consist on two types of devices: wireless MCU devices with a built-in network processor, and network processor standalone devices.
The SimpleLink™ Wi-Fi® CC31xx wireless network processor allows the connection of any low-cost, low-power microcontroller (MCU) to the Internet of Things (IoT), using standard communication interfaces such as SPI or UART. The scope of this document covers the following part numbers belonging to this type: CC3120, CC3130, and CC3135.
The SimpleLink™ Wi-Fi® CC32xx is a wireless MCU with an integrated high-performance Arm®Cortex®-M4 MCU, built-in Wi-Fi®, and a networking subsystem, allowing developers to write an entire application with a single-chip solution. The scope of this document covers the following part numbers belonging to this type: CC3220R, CC3220S, CC3220SF, CC3235S, CC3235SF, CC3230S, and CC3230SF.
The SimpleLink™ Wi-Fi®Internet-on-a chip™ family of devices introduces some advanced features and capabilities that further simplify connectivity of devices to the Internet:
Table 2-1 lists the key features of the SimpleLink™ Wi-Fi® device family.
Feature | Description | CC3120/CC3220 | CC3135/CC3235 | CC3130/CC3230 |
---|---|---|---|---|
Wi-Fi standards | 802.11b/g/n station | + | + | + |
802.11b/g access point with support for up to four stations | + | + | + | |
Wi-Fi Direct client / group owner | + | + | + | |
802.11a | + | |||
WFA IOT Low Power | + | + | ||
Wi-Fi channels | 1–13 | + | + | + |
36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165 | + | |||
Personal and Enterprise Wi-Fi security | WEP, WPA/WPA2 PSK | + | + | + |
WPA2+PMF, WPA3 | + | + | ||
WPA2 Enterprise (802.1x) | + | + | + | |
Wi-Fi provisioning | SmartConfig™ technology | + | + | + |
Wi-Fi Protected Setup (WPS2) | + | + | + | |
Access point mode with internal HTTP web server | + | + | + | |
IP protocols | IPv4/IPv6 | + | + | + |
IP addressing | Static IP, LLA, DHCPv4, DHCPv6 with DAD | + | + | + |
Cross layer | ARP, ICMPv4, IGMP, ICMPv6, MLD, NDP | + | + | + |
Transport | UDP, TCP | + | + | + |
SSLv3.0/TLSv1.0/TLSv1.1/TLSv1.2 | 6 | 16 | 16 | |
RAW | + | + | + | |
Network applications and utilities | Ping | + | + | + |
HTTP/HTTPS web server (including dynamic user call backs and RESTful API support) | + | + | + | |
mDNS | + | + | + | |
DNS-SD | + | + | + | |
DHCP server | + | + | + | |
OCSP TLS extension | + | + | ||
Host interface | UART/SPI | + | + | + |
Security | Secure key storage | + | + | + |
Trusted root-certificate catalog | + | + | + | |
TI root-of-trust public key | + | + | + | |
File system security | + | + | + | |
Secure boot | + | + | + | |
Secure content delivery | + | + | + | |
Initial secure programming | + | + | + | |
Debug security | + | + | + | |
Software tamper detection | + | + | + | |
Cloning protection | + | + | + | |
FIPS 140-2 level 1, compliant | + | |||
Power management | Enhanced power policy management uses 802.11 power save, and deep-sleep power modes | + | + | + |
Other | Transceiver | + | + | + |
Programmable Rx filters with events trigger mechanism | + | + | + | |
RSSI Trigger | + | + | + | |
Hostless mode | + | + | ||
Soft Roaming | + | + | ||
Agile multiband | + | + | ||
Triggered roaming | + | + | ||
Real time RSSI | + | + | ||
BLE / 2.4-GHz radio Coexistence | + | + |
Figure 2-1 shows a block diagram of the SimpleLink™ Wi-Fi® solution at a high level.
In the CC32xx wireless MCU the host is a Cortex®-M4 core, the networking subsystem is built into the device as an additional peripheral, and the interface between the Cortex®-M4 Core and the networking subsystem is internal.
The host driver is the same for the CC31xx and CC32xx devices, and the networking capabilities are similar for both devices. The network stack is fully implemented in the networking subsystem, thereby offloading the networking activities from the host MCU.
A simple application that only sends a UDP datagram on the local network requires minimum APIs as follows:
sl_Start Start the SimpleLink device in Wi-Fi Station mode
sl_WlanConnectConnect to a Wi-Fi network
sl_Socket Create a socket
sl_SendTo Sends UDP data
sl_Close Close the socket
sl_Stop Stops the SimpleLink device
The target application can choose to use the preferred networks option (profiles) instead of using the sl_WlanConnect command. This option allows the host application to completely offload the entire management of the WLAN connection.
Figure 2-2 shows a more detailed block diagram of the networking subsystem.
The SimpleLink™ Wi-Fi® Internet-on-a chip devices provide comprehensive networking functionality that offloads networking activities from the host MCU. TI provides a user-friendly host-software driver to simplify the integration and development of networking applications using the SimpleLink™ Wi-Fi® devices. This host driver can easily be ported to most platforms and operating systems (OSs). The host driver is written in strict ANSI-C (C89) and requires a minimal platform adaptation layer (porting layer).
The driver has a small memory footprint, and can run on 8-bit, 16-bit, or 32-bit MCUs with any clock speed (no performance or real-time dependency). Using SPI, both big- and little-endian MCUs are seamlessly supported. With UART, only little endian is supported.
The APIs of the SimpleLink™ host driver are arranged in several logical and simple modules (silos).
Table 2-2 provides a high-level description of these silos.
Silo | Description |
---|---|
Device | Provides interface to hardware and general functionality, such as start/stop or set and get configurations in the device level |
WLAN | Provides interface to WLAN 802.11 protocol-related functionality, such as mode (station, access point, or Wi-Fi Direct), provisioning, connection profiles, and connection policy |
Socket | Provides interface to sockets and adheres to BSD sockets. BSD sockets are the most common interface today for internet connectivity. |
NetApp | Provides interface to several networking services including the HTTP server service, DHCP server service, and MDNS client\server service |
NetCfg | Provides interface to configure different networking parameters, such as setting the MAC address and IP address settings (DHCP/Static) |
NetUtil | Provides interface to several network utilities, such as crypto utility, which provides a method for authenticating the device |
FS | Provides interface for storing and reading files through a secure file system managed on the serial flash component |
The SimpleLink™ device supports two physical host interfaces: SPI and UART. The same host driver can work with each of these interfaces by using an interface driver adaptation layer.
More information on the adaptation layer is in the host interface section, see Section 4 and Section 20.
The same driver can work on platforms running an OS, and platforms without an operating system (non-OS).
An OS adaptation layer is used for binding the host driver and the target OS. The driver already comes with a built-in adaptation layer for platforms running without an OS. Other platforms require a simple OS adaptation layer.
This adaptation layer must wrap two major objects:
The driver pre-allocates all the required OS resources (dynamic or static according to the setting) on calling sl_Start. The number of allocated objects is calculated according to the maximum concurrent actions required by the user.
The SimpleLink™ host driver does not use its own processing context. To bind a context to the driver, the user can implement a spawn mechanism, or use the built-in spawn mechanism provided by the driver. If the built-in mechanism is used, the host application must create a context dedicated to the driver and call sl_Task from this context. For platforms without an OS, the application must call the sl_Task function repeatedly from its main loop.