Getting Started with WiSeConnect™ SDK v3.x in SoC Mode#

This guide describes how to get started with developing an application for SiWx91x™ using the WiSeConnect™ SDK v3.x in System-on-chip (SoC) mode, where both the application and the networking stack run on the SiWx917 chipset.

Check Pre-requisites#

Hardware#

  • SiWx917 SoC development kit

  • Windows/Linux/MacOS computer with a USB port

  • USB cable

  • USB-to-TTL converter

  • Jumper cables

Software#

  • Simplicity Studio

  • A Terminal application

  • Tera Term for Windows

  • Serial Debug Assistant

Install Simplicity Studio#

  1. Download the latest version of Simplicity Studio and follow the installation instructions. During the installation, choose the technology type as 32-bit and Wireless MCUs.

  2. In the Simplicity Studio home page, select Install > Manage installed packages > Early Access. Manage Installed Packages

    Note: You may not have permission to access the Early Access page for SiWx917. To request permission, contact the Silicon Labs Sales team by clicking here.

  3. Select 32-bit and Wireless Product Early Access-x.x.xxx and click Install. Early Access

Connect SiWx91x to Computer#

  1. Connect your SiWx91x Wireless Starter Kit (WSTK) board to your computer using a USB cable.Hardware Connection

  2. Simplicity Studio will detect and display your radio board.Detect Board

Troubleshoot Board Detection Failure#

If Simplicity Studio does not detect your radio board, try the following:

  • In the Debug Adapters pane, Click the Refresh button (having an icon of two looping arrows).

  • Press the RESET button on the radio board.

  • Power-cycle your device by disconnecting and reconnecting the USB cable.

Install WiSeConnect 3 Extension#

  1. Launch Simplicity Studio.

  2. In the Debug Adapters pane, select your radio board.

  3. In the General Information section, click Manage SDKs. Click the Manage SDKs buttton

  4. In the Preferences window, go to the SDKs section, select Gecko SDK Suite vx.x.x and click Add Extension. Add Extension

  5. In the Add SDK Extensions window, click Browse

  6. Find and select WiSeConnect 3. Click the Browse button

  7. If a Verify SDK Extension popup is displayed, click Trust. Click the Trust button

  8. The selected WiSeConnect 3 extension will be displayed.

  9. Click Apply and Close. Selected Extension

  10. Open the command prompt.

  11. Enter the following command where <wiseconnect-3-extension-path> is the path where you downloaded the WiSeConnect - 3 extension:

    git apply --ignore-whitespace --ignore-space-change "<wiseconnect-3-extension-path>/utilities/gsdk_service_patch/gsdk_service.patch"

Note:

  • The GSDK path is displayed in the Location field in the Preferences > SDKs section mentioned in step 4 above.

  • The git apply command needs to be run to apply a GSDK patch not available with the current WiSeConnect 3 release. This patch will be automatically included in the next release.

Upgrade SiWx91x Connectivity Firmware#

Download the recommended version of firmware before you start with the update process.

Note: Simplicity Commander does not support upgrading the SiWx91x connectivity firmware on a Dual Flash radio board. To upgrade on Dual Flash, see the upgrading connectivity firmware with Kermit section.

Upgrade Connectivity Firmware using Simplicity Commander#

  1. In the Simplicity Studio home page, click Tools.

  2. In the Tools dialog, select Simplicity Commander and click OK.Select Commander

  3. In the Simplicity Commander window, click Select Kit and choose your radio board.Select Kit

  4. In the navigation pane, go to the Flash section.

  5. In the Flash MCU page, next to the Binary File field, click Browse.

  6. Locate and select the firmware file to be flashed on the radio board.

  7. Click Flash.Select the Flash Option Click the Flash button

  8. The firmware will be flashed and the Log Window will display a "Resetting" message.Flash Success

Troubleshoot Firmware Update Failure#

If the firmware update fails, try the following:

  • Toggle the power switch towards AEM (Advanced Energy Monitoring) on the WSTK board.

  • Perform the following steps and try the firmware update again

    • Toggle the ISP switch towards ISP on the radio board.

    • Press the RESET button on the WSTK board.

    • Toggle the ISP switch away from ISP on the radio board.

    • In the Flash MCU page, click Erase chip.

    • The flash will be erased.

    • Retry the firmware upgrade with Simplicity Commander.

Upgrade Connectivity Firmware using Kermit#

  1. Toggle the ISP switch towards ISP on the radio board.

  2. The VCOM light will glow on the WSTK board.Update Connectivity Firmware with Terra Term

  3. Open Tera Term for Windows and check for connected USB devices.

  4. Select the JLink CDC UART port.Select Port

  5. Modify the Baud Rate to 921600 to increase the connection speed.Enter Baud Rate

  6. Open the terminal application.

  7. Press CTRL+| to receive the boot message.

  8. Press U to display the boot menu.

  9. Enter B+0 to update the wireless firmware.

  10. From the menu, select File > Transfer > Kermit > Send.

  11. Browse for the firmware file and select it.

  12. The firmware will be flashed and you will see an "Upgradation Successful" message.

  13. An Enter Next Command prompt will appear.

  14. Enter 1.

  15. The device will start up the flashed image and you will see a "Loading..." message.Kermit Flash Success

  16. Toggle the ISP switch away from ISP to allow applications to be flashed afterwards.

Create Project#

  1. Open Simplicity Studio and connect the SiWx91x to your computer.

  2. Go to the Debug Adapters section.

  3. Select your radio board from the displayed list.

    • If you are using a Dual Flash radio board, select your radio board from the My Products page.Dual Flash detected as Common Flash

  4. The Launcher page will display the selected radio board's details.

  5. Click Overview.

  6. Verify the following in the General Information section:

    • The Debug Mode is Onboard Device (MCU).

    • The Preferred SDK is the version you selected earlier.Verify General Information

  7. Go to the EXAMPLE PROJECTS AND DEMOS section.

  8. Locate the example you want and click CREATE.Select Example

  9. In the New Project Wizard window, click Finish.Click Finish

Build Application#

  1. Open Simplicity Studio.

  2. In the Project Explorer pane, right-click the project name and select Build Project.

    • You may also click the Build button with a hammer icon on the Simplicity IDE perspective toolbar.Select Build Option

Flash Application#

  1. From the menu, select Run As > 1 Silicon Labs ARM Program.Flash Application

  2. The application binary will be flashed on the radio board and the application will start running.

Troubleshoot Application Flash Failure#

The application may fail to flash if Studio failed to detect your radio board. See the troubleshooting for board detection failure section.

Configure GDB Debugger#

Note: Application debugging currently does not work. This is a known issue and the following is the workaround for it.

  1. From the Simplicity Studio menu, select Run > Debug As > 1 Silicon Labs ARM Program.

  2. Studio will switch to debug mode and fail to halt execution at main() as described in the debugging section.

  3. Close the Debug pane.

  4. In the Project Explorer pane, right-click on your project name and select Debug As > Debug Configurations. Select Debug Configurations

  5. Select the Startup tab. Select Startup Tab

  6. Unselect the Set breakpoint at field.

  7. Click Apply and click Debug. Debug Configurations

Debug Application#

  1. From the Simplicity Studio menu, select Run > Debug As > 1 Silicon Labs ARM Program. Switch to Debug Mode

  2. Studio will switch to debug mode and halt execution at the main() function in your application.

  3. Add a break point in the desired location of the code and click the Resume button (having an icon with a rectangular bar and play button).

  4. Execution will halt at the break point.

  5. Use the following debug functions to direct the execution of the code:

    • Step In button (having an icon with a arrow pointing between two dots).

    • Step Over button (having an icon with an arrow going over a dot).

    • Step Out button (having an icon with an arrow pointing out from between two dots).Debug Options

  6. View the standard output as needed. See the console input and output section.

Troubleshoot Application Debug Failure#

The application may fail to enter the debug mode due to one of the following reasons:

  • Unknown reason - try re-launching Simplicity Studio.

  • Studio failed to detect your radio board. See the troubleshooting for board detection failure section.

  • Studio failed to halt execution at the main() function. Try the following steps:

    • Click the Suspend button (having a pause button icon).

    • Click the Reset button (having an icon of a play button with an arrow underneath).Reset Debug

Console Input and Output#

Note: The SiWx91x radio boards do not currently support VCOM. This support is coming soon. In the meantime:

  • Console output (such as logs) from the device can be seen by performing a WSTK firmware upgrade.

  • Console input (such as commands) can be sent to the device using a USB-to-TTL Converter.

View Console Output#

  1. Connect your WSTK board to your computer.

  2. Open Simplicity Studio.

  3. In the Debug Adapters pane, select your WSTK board.

  4. The Adapter FW field shows your WSTK board's current firmware version, similar to 1v4pxxbyyyy, where xx is the major version number.

  5. If the major version number is less than 10, click Update to 1.4.xx.yyyy. Upgrade WSTK Firmware

  6. The firmware will be upgraded on your WSTK board.

  7. In the Debug Adapters pane, right-click on your radio board and click Launch Console.Launch Console

  8. Select the Admin tab and press Enter to see the WPK> prompt.

  9. Enter the following command to set the Baud Rate:

    pti config 0 vuart 115200

    Admin Tab

  10. Select the Serial 0 tab to view the console output from the running application. Serial 0 Tab

Enter Console Input#

  1. Connect the TXD pin (pin 4) of the USB-to-TTL Converter to pin 14 on the WSTK board.

  2. Connect the GND pin (pin 1) of the USB-to-TTL Converter to pin 1 on the WSTK board.

  3. Press the RESET button on the WSTK board. USB-to-TTL Connection for Console Input

  4. Open Serial Debug Assistant.

  5. In the Serial Port dropdown, select the serial port to which the USB-to-TTL Converter is connected.

  6. Click Open serial port. Select Serial Port

  7. The serial port will be opened and the button will change to Close serial port.

  8. In the input area, enter the characters you wish to send to the SiWx91x device.

  9. Click the Send button (having an envelope icon). Send Input to SiWx91x

Customize Application Components#

Simplicity Studio allows you to add or remove functional components in your application, such as BSD Sockets.

Add Component#

  1. In the Project Explorer pane, select the project_name.slcp file.

  2. Select the SOFTWARE COMPONENTS tab.

  3. Search for and select the component that you want to install

  4. Click Install.Install Component

  5. Studio will add the component and display a success message.Component Added Successfully

Remove Component#

  1. Find the component you want to remove.

  2. Select the component and click Uninstall.Uninstall Component