PLATFORM EXAMPLES#

iostream_usart_baremetal#

This example demonstrates how to utilize the I/O stream service to communicate with UART via the virtual COM port (VCOM) in a bare metal environment. The example echoes any characters received over the serial connection back to the sender. The VCOM serial port can be accessed via USB.

memlcd_baremetal#

This example demonstrates how to utilize the Memory Liquid Crystal Display (MEMLCD) module in a bare metal application using the Silicon Labs Graphics Library (glib).

psram_blinky#

This example project demonstrates a blinky application (GPIO/LED toggling) running from PSRAM. By default, PSRAM contains the text segment, data segment, BSS segment, stack, and heap.

psram_driver_example#

This example project demonstrates how to use the PSRAM Driver APIs via the QSPI interface. The example writes and reads data to and from PSRAM in three modes: auto, manual blocking, and DMA. The program uses the PSRAM device's default configurations, which include fast quad read and write in QPI (Quad I/O) interface mode.

sl_si91x_adc_fifo_mode#

This program demonstrates the functionality of the Analog-to-Digital Converter (ADC) peripheral:

  • Converts analog input to 12-bit digital output.

  • Samples the data at specified intervals.

  • Depending on the operating mode, converts the sampled data to equivalent input voltages.

sl_si91x_adc_multichannel#

This program demonstrates how the Analog-to-Digital Converter (ADC) peripheral translates analog input into 12-bit digital output.

  • **Multichannel ADC (maximum of four channels)Data is sequentially sampled from up to four ADC channels and written to the receive FIFO in the same sequence.

sl_si91x_adc_static_mode#

This application demonstrates the functionality of the Analog-to-Digital Converter (ADC) peripheral. It includes the following features:

  • Converts analog input to 12-bit digital output.

  • Samples data at specified intervals.

  • Depending on the operating mode, converts the sampled data to equivalent input voltages.

sl_si91x_analog_comparator#

This example demonstrates the analog comparator functionality. If the non-inverting input voltage is greater than the inverting input voltage, the analog comparator output will be high, triggering an analog comparator interrupt.

  • Configuration used in the example:

    • Non-inverting input pin.

    • Inverting input pin.

    • Hysteresis value.

    • Filter enable/disable.

    • Comparator instance used for the application.

    • Threshold and scale factor values for internal voltages.

sl_si91x_bjt_temperature_sensor#

This application demonstrates the Bipolar Junction Transistor (BJT) temperature sensor peripheral. It converts the 12-bit digital output into temperature in the range of -40 to 125 degrees Celsius.

sl_si91x_blinky#

This application contains example code demonstrating GPIO/LED toggle functionality.

sl_si91x_button_baremetal#

This example application demonstrates the use of a BUTTON in a bare metal environment. The application toggles an LED each time the BUTTON is pressed using the sl_si91x_led_toggle() function.

  • Additional LED and BUTTON instances can be added.

sl_si91x_calendar#

This example demonstrates clock configuration, one-millisecond trigger, one-second trigger, alarm configuration, and time conversion.

sl_si91x_combo_app#

The purpose of this application is to demonstrate the use of CMSIS-RTOS concepts embedded with multiple peripherals. The following concepts are demonstrated:

  • Semaphores

  • Event Flags

This application contains a comprehensive sample application including multiple peripherals listed below:

  • PWM

  • I2C (as Driver Leader application)

  • GPIO Interrupts

  • Timer

The example creates separate threads for the peripherals Button, PWM, and I2C. These threads run in parallel but are synchronized using the CMSIS-RTOS concepts mentioned above.

sl_si91x_config_timer#

This Config Timer example demonstrates two use-cases of a timer: **First configuring a free-running timer with GPIO toggle functionality. Counter-0 is configured to generate interrupts every millisecond and toggle a GPIO. **Second using the timer as a waveform generator producing two PWM outputs. Counter-1 generates a square wave (50% duty cycle), and Counter-0 produces a waveform whose duty cycle continuously varies from 100% to 0% and then 0% to 100%, in steps of 1% every 20 milliseconds.

sl_si91x_crc#

This application contains example code demonstrating Cyclic Redundancy Check (CRC) generation on data transferred via Direct Memory Access (DMA).

  • Key features:

    • Generates CRC on data transferred via DMA.

    • Demonstrates CRC generation functionality using hardware acceleration provided by DMA.

sl_si91x_dac#

This application demonstrates the functionality of the Digital-to-Analog Converter (DAC) peripheral:

  • Converts digital input to 10-bit analog output.

  • Samples the data.

  • Converts the sampled data into analog output based on the selected operation mode.

sl_si91x_dma#

This application demonstrates the memory-to-memory DMA transfers of different sizes. Users can change the DMA transfer size by updating SL_DMA_TRANSFER_SIZE in the user configuration.

  • Key features:

    • Demonstrates both simple DMA transfer API and generic API for performing DMA transfers.

sl_si91x_efuse#

This application demonstrates how to program and read from the eFuse.

  • Programming eFuse Demonstrates how to program the eFuse.

  • Reading from eFuse Shows how to read data from the eFuse.

sl_si91x_gpio#

This application provides a low-level driver example and demonstrates the toggling of a GPIO every 1 second.

  • Key features:

    • Low-level driver example.

    • GPIO toggling at 1-second intervals.

sl_si91x_gpio_detailed_example#

This application demonstrates the toggling of a GPIO belonging to the High Power (HP) instance at 1-second intervals. Additionally, it provides usage examples of additional APIs.

  • Key features:

    • Toggling of HP instance GPIO at 1-second intervals.

    • Usage examples of additional APIs.

sl_si91x_gpio_example#

This application demonstrates how to configure and use High-Power (HP) pin interrupts.

sl_si91x_gpio_group_example#

This application demonstrates the usage of High-Power (HP) and Ultra-Low-Power (ULP) group interrupts.

sl_si91x_gpio_ulp_example#

This application demonstrates the toggling of an Ultra-Low-Power (ULP) instance GPIO at 1-second intervals. Additionally, it configures a ULP pin interrupt.

sl_si91x_gpio_uulp_example#

This application demonstrates the configuration of Ultra-Ultra-Low-Power (UULP) pin interrupts.

sl_si91x_gspi#

This application demonstrates the usage of the General SPI (GSPI) for data transfer in both full-duplex and half-duplex modes.

  • Key features:

    • Full-duplex operation: The master transmits data on the MOSI pin and receives the same data on the MISO pin in synchronous mode.

    • Supports sending and receiving data with any SPI slave.

    • Supports both DMA and non-DMA transfer.

    • For half-duplex communication (send and receive), a master/slave connection is required.

sl_si91x_i2c_driver_follower#

This application demonstrates data transfer from a follower to a leader device and then from the leader back to the follower. After transmission, the data is compared, and the result is printed on the console.

sl_si91x_i2c_driver_leader#

This application demonstrates data transfer between a leader and a follower device. The data is transmitted from the leader to the follower and then from the follower back to the leader. After transmission, the data is compared, and the result is printed on the console.

sl_si91x_i2c_follower#

This application provides a low-level driver example and demonstrates the configuration of I2C in follower mode. The SCL and SDA lines of the leader controller are connected to the follower's SCL and SDA pins. After transmission, the data is compared, and the result is printed on the console.

sl_si91x_i2c_leader#

This application provides a low-level driver example and demonstrates the configuration of I2C in leader mode. The SCL and SDA lines of the leader controller are connected to the follower's SCL and SDA pins. After transmission, the data is compared, and the result is printed on the console.

sl_si91x_i2s_loopback#

This application demonstrates Inter-IC Sound (I2S) transfer using a loopback mechanism.

sl_si91x_i2s_primary#

This application demonstrates Inter-IC Sound (I2S) primary device transfer.

sl_si91x_i2s_secondary#

This application demonstrates Inter-IC Sound (I2S) secondary device transfer.

sl_si91x_icm40627#

This application demonstrates the ICM40627 Relative Humidity and Temperature (RHT) sensor, which measures relative humidity and temperature via the I2C interface every 2 seconds.

sl_si91x_joystick#

This sample application demonstrates the use of the Joystick Driver. It prints the joystick position over the serial console at regular intervals.

sl_si91x_msg_queue#

This application demonstrates the use of CMSIS-RTOS concepts with multiple peripherals. The following concepts are demonstrated:

  • Message Queues

    • Key features:

      • Comprehensive sample application including multiple peripherals:

        • I2C (configured as a Follower)

        • UART

      • Separate threads created for each peripheral.

      • Threads run in parallel and are synchronized using CMSIS-RTOS concepts.

    • Additionally:

      • I2C is configured in follower mode, with the SCL and SDA lines of the leader controller connected to the follower's SCL and SDA pins. After transmission, the data is compared and the result is printed on the console.

      • The application demonstrates how to configure ULP UART in asynchronous mode, sending and receiving data in loopback mode.

sl_si91x_mutex#

The purpose of this application is to demonstrate the use of CMSIS-RTOS concepts with multiple peripherals. The following concept is demonstrated:

  • Mutex

    • Key features:

      • Example code demonstrating GPIO/LED toggle functionality.

      • Two threads are created for driving the same LED (which implies a common resource).

      • Threads run in parallel but are synchronized by Mutex for driving the LED.

sl_si91x_nvm3_common_flash#

This application demonstrates the use of Third Generation Non-Volatile Memory (NVM3) data storage in Si91x common flash.

  • Key features:

    • Performs WiFi initialization to allow communication between TA and M4.

    • Initializes NVM3 and performs the following operations:

    • Stores 4 keys in flash using NVM3 write.

    • Displays the 4 stored keys.

    • Deletes the 4 keys.

sl_si91x_nvm3_dual_flash#

This application demonstrates the use of Third Generation Non-Volatile Memory (NVM3) data storage in Si91x dual flash.

sl_si91x_power_manager_m4_wireless#

This application demonstrates the power manager service APIs, state transitions, sleep-wakeup (with RAM retention), and sleep-wakeup (without RAM retention).

sl_si91x_power_manager_tickless_idle#

This application demonstrates the power manager service APIs, state transitions (PS4 and PS3), and sleep-wakeup (PS4 and PS3 sleep with RAM retention).

sl_si91x_pwm#

This application demonstrates Pulse Width Modulation (PWM) to generate a periodic pulse waveform, which is useful in motor control and power control applications.

sl_si91x_rgb_led#

This application contains example code demonstrating GPIO/LED toggle functionality.

sl_si91x_ro_temperature_sensor#

This sample application demonstrates the use of the Ring Oscillator (RO) temperature sensor. It prints the temperature on the serial console.

sl_si91x_sdio_secondary#

The SDIO Secondary application demonstrates how to read and write data in SDIO Secondary.

sl_si91x_sensorhub#

This application demonstrates the SensorHub service, which provides a convenient framework to integrate any sensors on I2C, GPIO, UART, and ADC interfaces. It supports sensor activity in low-power mode.

sl_si91x_si70xx#

This application demonstrates the si70xx Relative Humidity and Temperature (RHT) sensor, which measures relative humidity and temperature via the I2C interface every 2 seconds.

sl_si91x_sio#

This application demonstrates Serial Input Output (SIO) for data transfer using SPI and UART.

sl_si91x_sleeptimer#

This application contains example code demonstrating one-shot and periodic SLEEPTIMER functionality with LED toggle.

sl_si91x_ssi_master#

This application demonstrates the use of Synchronous Serial Interface (SSI) for full-duplex data transfer in master mode.

sl_si91x_ssi_slave#

This application demonstrates the use of SSI for full-duplex data transfer in slave mode.

sl_si91x_sysrtc#

This application demonstrates LED toggling five times at every 1 second, then stops the timer.

sl_si91x_uart#

This application demonstrates the Universal Asynchronous Receiver-Transmitter (UART) configuration. It sends and receives data in loopback mode.

sl_si91x_ulp_adc#

This application demonstrates the Analog-to-Digital Converter (ADC) peripheral:

  • Converts analog input to 12-bit digital output.

  • Samples the data.

  • Converts the sampled data to equivalent input voltage based on the operation mode.

sl_si91x_ulp_adc_multichannel#

This application demonstrates the ADC (Analog-to-Digital Converter) peripheral, converting analog input to 12-bit digital output.

  • Key features:

    • Multichannel ADC (maximum 4 channels): Data is sampled from four ADC channels in sequential order and written to the receive FIFO in the same order.

sl_si91x_ulp_calendar#

This example demonstrates clock configuration, one-millisecond trigger, one-second trigger, alarm configuration, and time conversion.

  • Key features:

    • Clock configuration

    • One-millisecond trigger

    • One-second trigger

    • Alarm configuration

    • Time conversion

  • Note: Before enabling any trigger, it is recommended to calibrate the clock.

sl_si91x_ulp_dac#

This application demonstrates the Digital-to-Analog Converter (DAC) peripheral in Ultra-Low-Power (ULP) mode:

  • Converts digital input to 10-bit analog output.

  • Samples the data.

  • Converts the sampled data to analog output based on the operation mode.

sl_si91x_ulp_dma#

This DMA example performs memory-to-memory DMA transfers of different sizes. Users can change the DMA transfer size by updating SL_DMA_TRANSFER_SIZE in the user configuration.

  • Key features:

    • Utilizes both simple DMA transfer API and generic API for performing DMA transfers.

sl_si91x_ulp_gpio#

The ULP GPIO has 2 instances in the MCU:

  • ULP Domain is used to control the ULP GPIOs (ULP_GPIO_n; n=0 to 11).

  • UULP Domain is used to control the UULP GPIOs (UULP_GPIO_n; n=0 to 4).

  • Key points:

    • ULP GPIO domain has only one port, referred to as Port 4 in the program, which has a maximum of 12 pins.

    • All GPIO pins in the ULP Domain support set, clear, and toggle, and can be programmed as output or input.

sl_si91x_ulp_i2c_driver_leader#

This application demonstrates data transfer from a leader to a follower and then from the follower back to the leader in both high-power and low-power states. After transmission, the data is compared, and the result is printed on the console.

sl_si91x_ulp_i2s#

This application demonstrates ULP_I2S configured in PS2 state and master mode. The TX pin is connected to the RX pin in loopback mode.

  • The master transmits data on the TX pin using DMA and receives the same data on the RX pin using DMA.

  • The received data is compared with the transmitted data to ensure accuracy.

sl_si91x_ulp_ssi_master#

This application demonstrates the use of ULP SSI MASTER for data transfer in full-duplex and half-duplex modes in master mode.

  • Key features:

    • Synchronous mode with full-duplex operation:

      • Master transmits data on the MOSI pin and receives the same data on the MISO pin.

    • Supports sending and receiving data with any SSI slave.

    • Supports both DMA and non-DMA transfer.

    • For half-duplex communication (send and receive), a master/slave connection is required.

sl_si91x_ulp_timer#

This ULP_Timer example demonstrates ULP-TIMER functionality with LED toggle functionality.

  • Key features:

    • ULP Timer configured to generate interrupts upon expiration, toggling LED0.

    • Timer-0 set to expire at 1-second (1 Hz) intervals.

    • ULP Timer expiration depends on the TIMER_MATCH_VALUE, which is configurable.

    • When the timer count matches the TIMER_MATCH_VALUE, an interrupt occurs, and LED0 toggles.

sl_si91x_ulp_uart#

This application demonstrates the configuration of ULP UART in asynchronous mode, enabling both sending and receiving data.

sl_si91x_usart_async#

This application demonstrates the configuration and usage of Universal Synchronous Asynchronous Receiver-Transmitter (USART)

  • This application demonstrates the configuration of USART in asynchronous mode, enabling both sending and receiving data in loopback mode.

sl_si91x_usart_sync_master#

This application demonstrates the configuration and usage of the Universal Synchronous Asynchronous Receiver-Transmitter (USART).

  • Configures USART in synchronous mode as a master, enabling both sending and receiving data in loopback mode.

sl_si91x_usart_sync_slave#

This application demonstrates the configuration and usage of the Universal Synchronous Asynchronous Receiver-Transmitter (USART).

  • Configures USART in synchronous mode as a slave, enabling both sending and receiving data in loopback mode.

sl_si91x_veml6035#

This application demonstrates the VEML6035 Ambient Light Sensor, which measures lux via the I2C interface every 2 seconds.

sl_si91x_watchdog_timer#

This example demonstrates the triggering of Watchdog Timer (WDT) warnings and LED toggling in the WDT interrupt handler continuously for 6 times.

  • Key features:

    • The system restarts (kicks) the WDT on every interrupt.

    • On the sixth interrupt, the system does not restart the WDT, leading to a WDT reset of the application.

    • Afterwards, the WDT is started again with new parameters, and the LED is toggled for 6 more times.

    • Finally, the timer is stopped and de-initialized.