Proprietary Flex SDK Product Overview#
The Silicon Labs Proprietary Flex SDK supports developers who wish to take advantage of configurable protocol functionality provided in Silicon Labs Connect and the underlying RAIL library, as well as those who wish to start application development on top of RAIL to develop custom lower-level radio control, and network protocols.
This section covers:
Background information on RAIL, Connect, and the example applications included with the Flex SDK
Background information on the Gecko Bootloader
Prerequisites for application development using the Flex SDK
Support
Documentation
About Connect and RAIL#
The Flex SDK provides two paths to application development. The first begins with Silicon Labs RAIL (Radio Abstraction Interface Layer), which is an intuitive, versatile radio interface layer that is designed to support the implementation of arbitrary wireless protocols. The second uses Silicon Labs Connect protocol stack, which provides a fully-featured, easily-customizable wireless networking solution optimized for devices that require low power consumption and are used in a simple network topology. Connect example functionality is provided through easily-configurable components that can be turned on or off as desired.
Whether you begin development with Connect or RAIL is determined by the example application you select as a starting point in Simplicity Studio. Silicon Labs recommends that you start from a Connect example if you want to include the following functions without further development:
MAC layer functionality including frequency hopping and security
Network formation and, for star networks, routing support
Application-level functionality, including diagnostics, I/O, mailbox, and sleepy end device management
Bootloading, including serial and Broadcast or Unicast OTA (over-the-air)
The following sections provide additional detail on Connect and RAIL, including brief descriptions of the example applications. When you create a project based on an example, the Project Details on the Simplicity Studio IDE Overview tab provides additional detail about the example and interfacing with it.
Silicon Labs Connect#
Silicon Labs Connect functionality for the EFR32 is implemented on top of the RAIL library. Silicon Labs Connect supports many combinations of radio modulation, frequency and data rates. The stack includes all MAC layer functions such as scanning and joining, setting up of a point-to-point or star network, device types such as sleepy end nodes, routers or coordinators, radio configuration, frequency hopping and LBT (Listen Before Talk) protocols required for regulatory compliance in each geographical region, and PHY configuration for each of these regions. With all this functionality already implemented in the stack, developers can focus on their application development and not worry about the lower-level radio and network details.
The Flex SDK includes a number of Connect example applications including the following.
Connect SoC - Empty: A minimal Connect project structure, used as a starting point for custom applications.
Connect SoC - Direct mode Device: Demonstrates direct communication between nodes in range. The network parameters are commissioned by the application.
Connect SoC - MAC Mode Device: Demonstrates direct MAC mode communication between nodes in range.
Connect SoC - Sensor and Connect SoC - Sink: The sensor and sink applications demonstrate how to set up a star network topology in which communication occurs in both directions between the sink and the sensor(s) nodes.
Connect – SoC ECDH Key Exchange: Illustrates how to share the network key between multiple devices in a secure way (using Elliptic-curve Diffie-Hellman (ECDH) key agreement protocol).
Connect – SoC Switch: In combination with the Connect Bluetooth DMP – SoC Light example, demonstrates a simple wireless communication between two or more boards using the Connect SDK.
Connect Bluetooth DMP – SoC Empty: An RTOS-based project that provides a skeleton for Connect, with the only function being a Bluetooth LE Task with a basic CLI interface.
Connect Bluetooth DMP – SoC Light: In combination with the Connect – SoC Switch example, demonstrates a simple wireless communication between two or more boards using the Connect SDK.
Connect – NCP: A Co-Processor Communication secondary implementation of the Connect API. It can be used with the CPC daemon and the Connect host library and example applications. All can be found on github. See the readme of the application or UG435.08 Network Co-Processor Applications with Silicon Labs Connect v3.x for further info.
Silicon Labs RAIL#
Silicon Labs RAIL provides an intuitive, versatile radio interface layer designed to support proprietary or standards-based wireless protocols. RAIL is delivered as a library that you can link to your applications. A description of library functions is provided in the development environment. The RAIL API is documented in an online API reference available through Simplicity Studio and online at https://docs.silabs.com/.
RAIL:
Implements commonly-used radio functionality, so that it does not have to be written in the application or stack.
Eliminates the need for developers to become expert in RF register details of complex wireless SoCs.
Simplifies code migration to new wireless ICs and the development of new stacks by providing a common radio interface layer.
Allows lab evaluation in addition to application code development.
The RAIL library supports APIs for:
General Radio Operation
Channel definition and selection
Output power configuration
Transmit
Clear Channel Assessment before Transmit
Scheduled Transmit
Energy Detection
Receive
Packet Filtering
Calibration
CW (Carrier Wave) Transmission
Modulated Transmission
RFSense configuration as wake source
The Flex SDK includes example RAIL application code to demonstrate the capabilities of the device and the RAIL library. These examples are provided as source code to offer a starting point for application development. The following examples, among others, are included in the current release.
RAIL – SoC RAILtest
RAILtest is a general test tool for the RAIL library. RAILtest is developed by the core engineering team working on the RAIL library. As each RAIL library feature is implemented, a RAILtest serial command is added to allow scripted testing and ad hoc experimentation. Many of the RAILtest serial commands can be used for lab evaluation.
RAILtest includes commands to:
Transmit and receive packets.
Schedule transmits at a specific time in the RAIL timebase.
Configure RAIL address filtering to receive only specific packets.
Enable CCA mechanisms (CSMA/LBT) to validate that a channel is clear before transmit.
Set a timer callback in the RAIL timebase to see how the RAIL timer API works.
Change the transmit channel within the current configuration's band.
Change the transmit power level.
Enable RF energy sensing of specified duration across the 2.4 GHz and/or Sub-GHz bands, and sleep to wake on this event.
Output a continuous unmodulated tone for debugging.
Output a continuous modulated PN9 stream for debugging.
Enter into direct mode where data can be sent and received using asynchronous GPIOs as input and output.
RAIL – SoC Range Test
The Range Test examples enable over-the-air range testing between two devices customized with user-defined parameters. Range Test is designed to be run on Silicon Labs hardware without the need for commands from a host computer. This capability allows for mobility during range testing activities.
RAIL – SoC Range Test BLE and IEEEE80215.4
The Range Test examples enable over-the-air range testing between two devices customized with user-defined parameters. Five predefined PHYs can be used: BLE: 125kbps, BLE: 500kbps, BLE: 1Mbps, BLE: 2Mbps, IEEE80215.4: 250kbps.
RAIL – SoC Switch: Demonstrates the simplest exchange of transmit and receive operation between a light and a switch.
RAIL – SoC Light: Demonstrates the simplest exchange of transmit and receive operation between a RAIL light and a RAIL switch. The light is capable of periodically and on change reporting its status back to the switch. This is not the dynamic multiprotocol light example application.
RAIL – SoC Mode Switch: Demonstrates an exchange of transmit and receive operations between two (or more) nodes expanded by the Wi-SUN Mode Switching features implemented in RAIL.
RAIL – SoC Simple TRX Multi-PHY: Demonstrates the use of multiple PHYs selectable by channels. By default, channel 0 is configured to 2.4 GHz, 250 kbps, and channel 1 is configured to 915 MHz, 500 kbps (both packets are receivable by a single-PHY application using the correct pre-configured PHY). For details see AN971: EFR32 Radio Configurator Guide.
RAIL – SoC Simple TRX: Demonstrates the simplest transmit and receive functions based on RAIL.
RAIL – SoC Simple TRX Standards: Demonstrates the simplest transmit and receive functions based on RAIL based on IEEE Std. 802.15.4.
RAIL – SoC Simple TRX with Auto-ACK: Demonstrates the simplest exchange transmit and ack operation between two nodes, based on RAIL.
RAIL – NCP Simple TRX with CPC Support: Same as RAIL – SoC Simple TRX, but implements a Co-Processor Communication endpoint, so the device can be controlled through CPCd from a Linux computer, using UART interface.
RAIL – NCP Simple TRX with CPC Support (SPI): Same as RAIL – SoC Simple TRX with CPC Support, but uses SPI interface to communicate with CPCd.
RAIL – SoC Long Preamble Duty Cycle: Demonstrates how Rx duty cycling can be implemented using a long preamble.
RAIL – SoC Burst Duty Cycle: Demonstrates how Rx duty cycle can be implemented using repeated transmissions
RAIL – SoC Energy Mode: Demonstrates the low power modes (EM0-Active, EM1-Sleep, EM2-Deep Sleep). of the EFR32.
RAIL – SoC Empty: A minimal RAIL project structure, used as a starting point for custom applications.
RAIL Bluetooth DMP – SoC Range Test: Range Test with Bluetooth connectivity. It runs on top of Micrium OS RTOS and multiprotocol RAIL.
RAIL Bluetooth DMP – SoC Range Test BLE and IEEE802.15.4: Range Test BLE and IEEE802.15.4 with Bluetooth connectivity. It runs on top of Micrium OS RTOS and multiprotocol RAIL.
RAIL - SoC Wireless M-bus Meter: Implements a Wireless M-Bus meter application. For details, see AN1119: Using RAIL for Wireless M-Bus Applications with EFR32. Uses the multi-PHY configurator and is capable of limited multi-PHY features, like asymmetric bidirectional modes. For details see AN1253: EFR32 Radio Configurator Guide for Simplicity Studio 5.
RAIL - SoC Wireless M-bus Collector: Implements a Wireless M-Bus collector application. For details, see AN1119: Using RAIL for Wireless M-Bus Applications with EFR32. Uses the multi-PHY configurator. For details see AN1253: EFR32 Radio Configurator Guide for Simplicity Studio 5.
Project Structure#
Projects always include the following parts:
autogen folder: Only the autogen folder includes generated code. It includes the PHY configuration (rail_config.c), init code, the linker script, and other generated code used by components, like the command descriptors for the CLI interface.
config folder: Component configuration headers are located in this folder. These can be edited with the Simplicity IDE Component Editor, but directly editing the header file is also possible. The Component Editor is available through the Project Configurator’s Configure control, available only for configurable components.
gecko_sdk folder (with version number): Contains source and binary files added by components.
files in the root folder: Only the application specific files should be in the root folder, including source files, the project configurator (.slcp) file and the Pin Tool (.pintool) file.
All projects include main.c, which is not recommended to modify. Instead, add the initialization code to app_init.c, and implement the main loop in app_process.c. This way, the System components can initialize components, and call the "process" function of the components that require it. Additionally, enabling an RTOS will convert app_process's main loop into an RTOS task.
These files are also available in Connect projects, and can be used for example for init and process tasks that are independent of the stack running or not. However, it is still recommended to use emberAfInitCallback() and emberAfTickCallback(), so the Connect stack could prioritize urgent stack operations above the application.
The Gecko Bootloader#
A bootloader is a program stored in reserved flash memory that can initialize a device, update firmware images, and possibly perform some integrity checks. Silicon Labs networking devices use bootloaders that perform firmware updates in two different modes: standalone (also called standalone bootloaders) and application (also called application bootloaders). An application bootloader performs a firmware image update by reprogramming the flash with an update image stored in internal or external memory. For more information about bootloaders see UG103.6: Bootloader Fundamentals.
The Gecko Bootloader is a code library configurable through Simplicity Studio’s IDE to generate bootloaders that can be used with a variety of Silicon Labs protocol stacks. The bootloaders work with specialized firmware update image formats. The Gecko Bootloader update images has the extension .gbl.
Examples provided for the EFR32 parts include Silicon Labs Gecko Bootloader examples. Examples are provided for all compatible Simplicity Studio SDKs. For more information on using the Gecko Bootloader see UG266: Silicon Labs Gecko Bootloader User’s Guide in GSDK 3.2 and Lower and Silicon Labs Gecko Bootloader User's Guide for GSDK 4.0 and Higher.
Note: When working with the Gecko Bootloader, you must use Simplicity Commander to enable some configuration options such as security features.
Gecko Platform#
The Gecko Platform is a set of drivers and other lower layer features that interact directly with Silicon Labs chips and modules. Gecko Platform components include EMLIB, EMDRV, RAIL Library, NVM3, and mbedTLS. For more information about Gecko Platform, see release notes that can be found in Simplicity Studio’s Documentation tab.
Prerequisites#
Before following the procedures in this guide you must have:
Purchased one of the Wireless Gecko (EFR32) Portfolio Wireless Kits.
Installed the Flex SDK. The Flex SDK is provided as part of the Gecko SDK (GSDK), the suite of Silicon Labs SDKs. To quickly get started with the GSDK, install Simplicity Studio 5, which will set up your development environment and walk you through GSDK installation. Simplicity Studio 5 includes everything needed for IoT product development with Silicon Labs devices, including a resource and project launcher, software configuration tools, full IDE with GNU toolchain, and analysis tools. Installation instructions are provided in the online Simplicity Studio 5 User’s Guide. Alternatively, Gecko SDK may be installed manually by downloading or cloning the latest from GitHub. See https://github.com/SiliconLabs/gecko_sdk for more information.
See the Flex SDK v3.x release notes for version restrictions and compatibility constraints for Connect and RAIL and these components.
Simplicity Commander is installed along with Simplicity Studio. An application with limited functionality can be accessed through Simplicity Studio’s Tools menu. Most functions are accessible through a CLI invoked by opening a command prompt in the Simplicity Commander directory. See UG162: Simplicity Commander Reference Guide for more information.
(optional) Installed IAR Embedded Workbench for ARM (IAR EWARM). See the Release Notes for the IAR version supported by this version of the Flex SDK. This can be used as a compiler in the Simplicity Studio development environment as an alternative to GCC (The GNU Compiler Collection), which is provided with Simplicity Studio. Download the supported version from the Silicon Labs Support Portal, as described below. Refer to the “QuickStart Installation Information” section of the IAR installer for additional information about the installation process and how to configure your license.
To get a 30-day evaluation license for IAR:
Go to the Silicon Labs support portal at https://www.silabs.com/support.
Scroll down to the bottom of the page, and click Contact Support
If you are not already signed in, sign in.
Click the Software Releases tab. In the View list select Development Tools. Click Go. In the results is a link to the IAR-EWARM version named in the release notes.
Download the IAR package (takes approximately 1 hour).
Install IAR.
In the IAR License Wizard, click Register with IAR Systems to get an evaluation license.
Complete the registration and IAR will provide a 30-day evaluation license.
Once IAR-EWARM is installed, the next time Simplicity Studio starts it will automatically detect and configure the IDE to use IAR-EWARM.
Technical Support#
You can access the Silicon Labs support portal at https://www.silabs.com/support through Simplicity Studio 5’s Welcome view under Learn and Support. Use the support portal to contact Customer Support for any technical questions you might have during the development process.
Documentation#
Hardware-specific documentation may be accessed through links on the part OVERVIEW tab in Simplicity Studio 5.
SDK documentation and other references are available through the Documentation tab.