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 Prerequisites#

Hardware#

  • SiWx917 SoC development kit

  • Windows/Linux/MacOS computer with a USB port

  • USB cable

  • For boards other than BRD4338A:

    • USB-to-TTL converter

    • Jumper cables

Software#

  • Simplicity Studio

  • GSDK version 4.3.1 or later

  • For boards other than BRD4338A:

    • Serial Debug Assistant

Note: We recommend using the latest GSDK version.

Install Simplicity Studio#

  1. Download the latest version of Simplicity Studio and follow the installation instructions. During the installation:

    • make sure you log in to Simplicity Studio in the Installation Manager window,

    • select Install by technology type, and

    • select the WiSeConnect extension under 32-bit and Wireless MCUs.

    Select WiSeConnect 3 ExtensionSelect WiSeConnect 3 Extension

  2. To install Early Access packages, select Install > Manage installed packages from the Simplicity Studio home page.

    Note: To request Early Access permission, contact the Silicon Labs Sales team by clicking here.

    Manage Installed PackagesManage Installed Packages

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

    Note: If you already installed Early Access packages, you may see an option to Update the packages. Click Update.

    Early AccessEarly Access

Connect SiWx91x to Computer#

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

    Hardware ConnectionHardware Connection

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

    Detect BoardDetect Board

Troubleshoot a Board Detection Failure#

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

  • Request access to and install the Early Access packages if not already done. See step 2 in the Install Simplicity Studio section.

  • 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 the WiSeConnect 3 Extension#

If you already selected the WiSeConnect - 3.x.x extension while Install Studio, you may skip this section.

Before installing the WiSeConnect 3 extension, upgrade to a compatible GSDK version if not already done. See the Prerequisites section for the supported GSDK versions.

You may install WiSeConnect 3 through one of the following alternative paths:

Install WiSeConnect 3 through the Installation Manager#

  1. Log in to Simplicity Studio if not already done.

  2. In the Simplicity Studio home page, select Install > Manage installed packages.

    Manage Installed PackagesManage Installed Packages

  3. Select the SDKs tab.

  4. Next to the WiSeConnect - 3.x.x extension, click Install.

    Install from the SDKs TabInstall from the SDKs Tab

Install WiSeConnect 3 through the Manage SDKs Window#

  1. Download the WiSeConnect v3.x source code from the following URL after substituting 3.x.x with the desired release version:

    https://github.com/SiliconLabs/wiseconnect/archive/refs/tags/v3.x.x.zip
    • If you don't know your release version, go to the GitHub Releases Page and select the version to download.

  2. Unzip the downloaded wiseconnect-3.x.x.zip file. It will be extracted into a folder structure similar to the following:

    wiseconnect-3.x.x
    |--- wiseconnect-3.x.x
    |------ <source code>
  3. Launch Simplicity Studio and log in.

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

  5. In the General Information section, click Manage SDKs.

    Click the Manage SDKs butttonClick the Manage SDKs buttton

  6. The Preferences window will be opened in the SDKs section.

  7. Select Gecko SDK Suite vx.x.x and click Add Extension.

    Add ExtensionAdd Extension

  8. In the Add SDK Extensions window, click Browse.

    Click the Browse buttonClick the Browse button

  9. Locate and select the wiseconnect-3.x.x sub-folder extracted in step 2 above which contains the source code.

  10. Studio will detect the WiSeConnect 3 SDK extension.

  11. Select the detected extension and click OK.

    Add SDK Extensions WindowAdd SDK Extensions Window

  12. If a Verify SDK Extension popup is displayed, click Trust.

    Click the Trust buttonClick the Trust button

  13. The selected WiSeConnect 3 extension will be displayed.

  14. Click Apply and Close.

    Selected ExtensionSelected Extension

Upgrade SiWx91x Connectivity Firmware#

We recommend that you upgrade the SiWx917 connectivity firmware to the latest available version when:

  • you first receive an SiWx917 evaluation kit (EVK)

  • you first receive a radio board, or

  • you upgrade to a new version of the WiSeConnect 3 extension

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

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

    Select CommanderSelect Commander

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

    Select KitSelect Kit

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

  5. Click Browse next to the Binary File field.

    Select the Flash OptionSelect the Flash Option

  6. Locate and select the firmware file to flash from within the connectivity_firmware sub-folder of the WiSeConnect 3 extension path.

    Note:

    • If you don't see any files in the sub-folder, select All files in the file filter field in the Browse dialog.

    • The WiSeConnect 3 extension path is the one where the extension was downloaded during installation. If you're not sure what the path is, you may refer to the location in the Preferences > SDKs page shown on clicking Manage SDKs.

    Click the Manage SDKs butttonClick the Manage SDKs buttton

    Selected ExtensionSelected Extension

  7. Click Flash.

    Click the Flash buttonClick the Flash button

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

    Flash SuccessFlash 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 section in step 5 above, click Erase chip.

    • The flash will be erased.

    • Retry the firmware upgrade.

Create Project#

  1. Log in to 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.

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

  5. Select the OVERVIEW tab.

  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 InformationVerify General Information

  7. Select the EXAMPLE PROJECTS AND DEMOS tab.

  8. Locate the example you want and click CREATE.

    Select ExampleSelect Example

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

    Note: The Copy contents option is not currently supported.

    Click FinishClick Finish

Note: The Make a Copy option is not currently supported while editing a shared SDK file, when prompted to either make a copy of the file or edit it in the SDK itself.

Copy File or Edit in SDKCopy File or Edit in SDK

Build an Application#

  1. Launch Simplicity Studio and log in.

  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 OptionSelect Build Option

Flash an Application#

There are two alternative methods to flash an application to the application processor of the SiWx91x device:

Flash an Application Built Using Simplicity Studio#

  1. Build the application as described in the Build an Application section.

  2. In the Project Explorer pane, right-click on your project name and select Run As > 1 Silicon Labs ARM Program.

    Flash ApplicationFlash Application

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

  4. View the standard output or enter input data as needed. See the Console Input and Output section.

Flash an Application Binary#

  1. If the binary was built as described in the Build an Application section, a file with a .rps extension is generated. This file will be available under GNU ARM vXX.x.x - Default in the users workspace. To see its location, right-click on the .rps file and select Show In > System Explorer.

    • Alternatively, you may have obtained a .rps file through another means such as someone else building and providing the binary to you.

      M4 rpsM4 rps

  2. Follow the instructions in the Flashing the SiWx91x Connectivity Firmware section to flash the application binary. Instead of choosing the SiWx91x firmware file, select the .rps you want to flash.

    Note: If you don't see .rps files in the sub-folder, select All files in the file filter field in the Browse dialog.

    Browse the fileBrowse the file

Troubleshoot an 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 the Debugger#

Note: Application debugging currently does not work. This is a known issue and has two alternative workarounds:

Configure the Simplicity Studio Debugger#

  1. Open Simplicity Studio.

  2. Click Preferences.

  3. In the Preferences window, select Simplicity Studio > Debuggers.

  4. Select Simplicity Studio Debugger and click Apply.

  5. Click Apply and Close.

    Select Simplicity Studio DebuggerSelect Simplicity Studio Debugger

Configure the GDB Debugger#

  1. In the Project Explorer pane, right-click on your project name and select 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 ConfigurationsSelect Debug Configurations

  5. Under GDB SEGGER J-Link Debugging, select your project name.

  6. Select the Startup tab.

    Select Startup TabSelect Startup Tab

  7. Unselect the Set breakpoint at field.

  8. Click Apply and click Debug.

    Debug ConfigurationsDebug Configurations

Debug an Application#

  1. In the Project Explorer pane, select your project name.

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

    Switch to Debug ModeSwitch to Debug Mode

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

  4. 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).

  5. Execution will halt at the break point.

  6. 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 OptionsDebug Options

  7. View the standard output or enter input data as needed. See the Console Input and Output section.

Troubleshoot an Application Debug Failure#

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

  • 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).

  • Unknown reason - try re-launching Simplicity Studio.

    Reset DebugReset Debug

Console Input and Output#

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

  • If you are using BRD4338A, console output and input can be performed after upgrading the WSTK firmware.

  • If you are using a board other than BRD4338A:

    • 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.

Perform Console Output and Input for BRD4338A#

Note: If you are using the BRD4338A radio board, the WSTK firmware is not available in Simplicity Studio and must be flashed by following the steps below. This firmware will be available in a future release. For other boards, see the sections that follow for console output and console input.

  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 1vnpxxbyyy, where n is the major version, xx is the patch version number and yyy is the build number.

  5. Click Update to 1.4.xx.yyyy if the version is before 1v4p10b215, or in other words:

    • Major version = 4 and one of the following is true:

      • patch < 10 or

      • patch = 10 and build < 215

    Upgrade WSTK FirmwareUpgrade 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 ConsoleLaunch Console

  8. Select the Serial 1 tab.

  9. Place the cursor inside the text input field and hit Enter.

  10. Console output will start getting displayed in the Serial 1 tab.

    Serial 1 Tab for Console OutputSerial 1 Tab for Console Output

  11. Console input can be entered and sent to the device.

    Serial 1 Tab for Console InputSerial 1 Tab for Console Input

View the Console Output for Other Boards#

If you are using BRD4338A, please follow the instructions in the Console Output and Input for BRD4338A section for viewing console output. Otherwise, follow the steps here.

  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 1vnpxxbyyyy, where n is the major version, xx is the patch version number and yyy is the build number.

  5. Click Update to 1.4.xx.yyyy if the version is before 1v4p10b..., or in other words, major version = 4 and patch < 10.

    Upgrade WSTK FirmwareUpgrade 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 ConsoleLaunch 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 TabAdmin Tab

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

    Serial 0 TabSerial 0 Tab

Enter the Console Input for Other Boards#

If you are using BRD4338A, please follow the instructions in the Console Output and Input for BRD4338A section for entering console input. Otherwise, follow the steps here.

  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 InputUSB-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 PortSelect 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 SiWx91xSend Input to SiWx91x

Customize Application Components#

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

Add a Component#

  1. In the Project Explorer pane, double-click the project_name.slcp file.

  2. Select the SOFTWARE COMPONENTS tab.

  3. Select the SDK Extensions filter.

  4. Browse or search for and select the component that you want to install.

  5. Click Install.

    Install ComponentInstall Component

  6. Studio will add the component and display a success message.

    Component Added SuccessfullyComponent Added Successfully

Remove a Component#

  1. View the list of WiSeConnect 3 extension components by following steps 1-3 of the previous section.

  2. Select the Installed filter to view the components you have installed.

  3. Browse or search for and select the component you want to remove.

  4. Select the component and click Uninstall.

    Uninstall ComponentUninstall Component