Gecko Platform Examples#

This Document serves as a base for the SiliconLabs platform peripheral examples.

A number of examples are provided with Simplicity Studio and the Gecko SDK. Each example has an associated README that explains the purpose of the example. Because new examples are always being added, the GSDK may contain other examples not documented here, Please refer this page for more examples.

Many of these examples are intended only to test specific aspects of the platform drivers. They are not intended as a starting point for your own application, although they may contain code for some features you want to use. Platform - Empty C Example is a recommended starting point.

Platform - Empty C Example: This example project shows an empty configuration that can be used as a starting point to add components and functionality.

Platform - Blink Bare-metal: This sample application demonstrates LED blink in a bare metal environment. The LED instance and toggle period can be configured in blink.c file. This application can be used to execute basic LED functionalities such as on, off, toggle, or retrieve the on/off status on Silicon Labs devices. There are different sample applications which demonstrates the same functionality in Kernel FreeRTOS and Micrium OS environment.

Platform - CLI Bare-metal: This example project demonstrates use of the command line interface component in a bare metal environment. The command line interface over the VCOM serial port. The example provides commands echo-str, echo-int which echoes the input arguments and LED which allows the user to turn on, turn off, or toggle the LEDs on the board.

Platform - Coulomb Counter Bare-metal: This example application demonstrates how to read coulomb counter total charge and store it in NVM3. See AN1188: EFP01 Coulomb Counting for more details about coulomb counter.

Platform - DMADRV Bare-metal: This example project demonstrates use of the direct memory access driver in a bare metal environment. The user is prompted to enter data over the VCOM serial port. Once the configured amount of data has been transferred, the data is echoed back to the user.

Platform - I2C Simple Polled Master Bare-metal: This example project demonstrates how to use the I2C Simple Polled Master driver using the Si7021 Relative Humidity and Temperature Sensor in a bare-metal configuration. The initial temperature is read, and upper and lower limits are calculated. When the current temperature reaches the upper limit, LED0 is turned on and LED1 is turned off. When the current temperature reaches the lower limit, LED1 is turned on and LED0 is turned off. This driver supports master mode, single bus-master only. It blocks while waiting for the transfer is complete, polling for completion in EM0.

Platform - I/O Stream USART Bare-metal: The UART driver supports the UART capabilities of the USART, UART, and LEUART peripherals. This example project uses the I/O Stream service running in a bare-metal configuration to demonstrate the use of UART communication over the virtual COM port (VCOM). The application will echo back any characters it receives over the serial connection. The VCOM serial port can be used either over USB or by connecting to port 4902 if the kit is connected via Ethernet.

Platform - Joystick Bare-metal: This sample app demonstrates the use of the Joystick Driver in a bare metal environment. It prints the joystick position after every finite interval over the virtual COM serial port (VCOM). VCOM can be used either over USB or by connecting to port 4902 if the kit is connected via Internet. The Wireless Pro Kit (BRD4002A) must be used as the mainboard to mount and connect the compatible radio board.

Platform - NVM3 Bare-metal: This example application demonstrates the use of Third Generation Non-Volatile Memory (NVM3) data storage. The application uses command line interface to execute operations Write, Read and Delete on NVM3 which are given by user. This application can save 10 files. Additionally, the number of writes and deletes are saved in the counter objects in the nvm3_app.c file.

Platform - Sleeptimer Bare-metal: This example project demonstrates periodic and one-shot timers using the low-frequency real-time clock peripheral in a bare metal environment. The application uses low frequency RTC (Real Time Clock) peripheral to create periodic and one-shot timers. The on-board button is used to control the timers stop and start operation. The status will be shown on the virtual COM serial port console. See AN0005: Real Time Counters and AN0014: EFM32 Timers for more details about timers.

Platform - SPIDRV Master Bare-metal: This example project demonstrates the use of the Serial Peripheral Interface in primary mode in a bare metal configuration. Once the primary application is installed on a starter kit, the kit can be connected via the 20-pint expansion header to a second kit which has the secondary application installed. The user can then connect to the device via the VCOM serial connection. The primary and secondary devices will periodically exchange data, logging the exchanges over VCOM.

Platform - UARTDRV LEUART Bare-metal: This example project demonstrates use of the UARTDRV driver with LEUART in a bare metal application. The application will echo back any characters it receives over the serial connection.

Requirements#

  • Desired Silicon Labs Starter Kit

  • Simplicity Studio 5 or IAR Workbench IDE

  • Gecko SDK Suite 4.3, available via Simplicity Studio

For more information on installing Simplicity Studio refer Simplicity Studio User Guide

For more information on installing IAR workbench IDE refer IAR workbench User Guide