Developing with WiSeConnect™ SDK v3.x with SiWx91x™ Boards#

This guide describes how to develop applications on a SiWx91x™ board using the WiSeConnect™ SDK v3.x in System-on-chip (SoC) mode, where both the application and the connectivity stack run on the SiWx91x chipset.

Note: The output images in this guide are for illustration purposes only. Details such as board names and version numbers may not exactly match the product.

Check Prerequisites#

Note: The hardware and software requirements mentioned in this section are specific to the example(s) recommended with this guide in the Create Project section. If you are working with a different example, refer to its README page for the hardware and software requirements. To see the README page of a specific example, click on the Go to README link next to it in the Examples page.

Software#

  • Simplicity Studio

  • Simplicity software development kit (SiSDK (formerly GSDK)) with WiSeConnect 3 extension

Note:

  • We recommend using the latest SiSDK (formerly GSDK) version.

  • Refer to the Release Notes for the SiSDK (formerly GSDK) version tested with respective release.

Hardware#

  • Wi-Fi Access Point (802.11 ax/b/g/n)

  • BRD4002A - Si-MB4002A Wireless Pro Kit Mainboard (hereafter referred to as WPK board).

  • One of the following SoC boards (hereafter referred to as SiWx917 board):

    • BRD4338A - SiWx917 Wi-Fi 6 and Bluetooth LE 8MB Flash Radio Board

    • BRD4342A - SiWx917 Wi-Fi 6 and Bluetooth LE 8MB Flash + 8MB ext PSRAM Radio Board

    • BRD4343A - SiWG917Y Module Wi-Fi 6 and Bluetooth LE 8MB Flash RF-Pin Radio Board

    • BRD2605A - SiWG917 Dev Kit Board

  • Windows/Linux/MacOS computer with a USB port

  • Type C USB cable compatible with the computer's USB port (for e.g., type C to type A if the computer has a type A USB port).

Setup Software#

You may setup the following software in this section while waiting to receive the hardware:

Install Simplicity Studio#

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

    During the installation, make the following selections:

    • Select Install by technology type.

      Select Install by technology typeSelect Install by technology type

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

      Select WiSeConnect 3 ExtensionSelect WiSeConnect 3 Extension

    • Click Next to install the Simplicity SDK with the WiSeConnect extension.

      Select Development PackagesSelect Development Packages

Install the GNU ARM v12.2.1 Toolchain#

Note: From v4.4.0 on, Simplicity SDK (formerly Gecko SDK) (SiSDK (formerly GSDK)) requires v12.2.1 of the GNU ARM toolchain to compile a project successfully. Follow the instructions in this section to install this toolchain version and configure it for your new projects.

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

    Manage Installed PackagesManage Installed Packages

  2. Select the Toolchains tab.

  3. Click Install next to GNU ARM Toolchain (v12.2.rel1.xxxx.x) - 12.2.yyyy, where xxxx.x and yyyy may vary depending on the toolchain minor or patch version.

    Install GNU ARM Toolchain 12.2.1Install GNU ARM Toolchain 12.2.1

  4. The toolchain will be installed.

  5. Close the Installation Manager window.

  6. Click Preferences.

  7. Expand the Simplicity Studio section in the Preferences dialog and select the Toolchains section.

  8. Select GNU ARM v12.2.1 and un-select all other toolchains shown.

  9. Click Apply and Close.

    Select the GNU ARM v12.2.1 toolchainSelect the GNU ARM v12.2.1 toolchain

Note: If you have an existing project, see Silicon Labs community page for instructions to configure the toolchain version in your project.

Install the WiSeConnect 3 Extension#

If you already selected the WiSeConnect extension in the Install Simplicity Studio section, you may skip this section.

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

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

Install WiSeConnect 3 through the Installation Manager#

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

    Manage Installed PackagesManage Installed Packages

  2. Select the SDKs tab.

  3. 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#

Note:

  • You must have the hardware available before using these steps to install the WiSeConnect 3 extension.

  • Make sure that you use SiSDK and WiSeConnect 3 SDK versions from the same release. To determine which SiSDK and WiSeConnect 3 SDK versions are in a particular release, see the Release Details section of WiSeConnect 3 SDK Release Notes for SoC.

  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.

  4. Connect the SiWx91x to your computer.

  5. In the Debug Adapters pane, select your SiWx917 board.

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

    Click the Manage SDKs butttonClick the Manage SDKs buttton

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

  8. Select Simplicity SDK (formerly Gecko SDK) Suite vx.x.x and click Add Extension.

    Add ExtensionAdd Extension

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

    Click the Browse buttonClick the Browse button

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

  11. Studio will detect the WiSeConnect 3 SDK extension.

  12. Select the detected extension and click OK.

    Add SDK Extensions WindowAdd SDK Extensions Window

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

    Click the Trust buttonClick the Trust button

  14. The selected WiSeConnect 3 extension will be displayed.

  15. Click Apply and Close.

    Selected ExtensionSelected Extension

Connect SiWx91x to Computer#

  1. Connect the WPK board to your computer using a USB cable.

    Hardware ConnectionHardware Connection

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

    Detect BoardDetect Board

Note: See the troubleshoot a board detection failure section in case of studio failed to detect your board.

Update SiWx91x Connectivity Firmware#

Note: The SiWx917 connectivity firmware version is tightly coupled with the WiSeConnect 3 extension version. You must update the SiWx917 connectivity firmware when:

  • you first receive an SiWx917 Pro kit

  • you first receive an SiWx917 board, or

  • you upgrade or downgrade your WiSeConnect 3 extension

You can update the SiWx91x connectivity firmware by using one of the following paths:

Update Firmware using Simplicity Studio Launcher#

Note: This method requires Simplicity Studio version SV5.9.0.1 or above.

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

  2. Go to the Debug Adapters section.

  3. Select your SiWx917 board from the displayed list.

  4. The product information OVERVIEW tab is displayed.

  5. Next to the Connectivity FW field, click Read FW Version.

  6. A warning message is displayed.

  7. Click Yes.

    Read FW VersionRead FW Version

  8. After resetting your connected SiWx91x board, its current firmware version will be displayed next to the Connectivity FW field. If the firmware version is older than that required for your installed WiSeConnect 3 extension, the Update to xxxx option will be shown where xxxx is the version available with your WiSeConnect 3 extension.

    Note: If the firmware version matches the one required for your WiSeConnect 3 extension, you will see the screen described in step 13 below.

    Display FW VersionDisplay FW Version

  9. Click Update to xxxx.

  10. The Connectivity Firmware Update Warning message is displayed.

  11. Click Yes.

    Connectivity Firmware Update WarningConnectivity Firmware Update Warning

  12. A progress message is shown.

    Load FW VersionLoad FW Version

  13. On successful update, the updated firmware version will be displayed next to the Connectivity FW field, with the label "Latest" next to it indicating that the SiWx917 connectivity firmware version now matches the one required for your installed WiSeConnect 3 extension.

    Latest FW VersionLatest FW Version

Note: See the troubleshoot a firmware update failure section in case of failure in updating the firmware.

Update 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 CommanderSelect Commander

  3. In the Simplicity Commander window, click Select Kit and choose your SiWx917 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 appropriate sub-folder of the WiSeConnect 3 extension path:

    • For OPN SiWG917M110LGTBA, select the firmware file from the connectivity_firmware/lite sub-folder.

    • For all other OPNs, select the firmware file from the connectivity_firmware/standard sub-folder.

    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 the message: "Flashing completed successfully!"

Note: See the troubleshoot a firmware update failure section in case of failure in updating the firmware.

Create a Project#

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

  2. Go to the Debug Adapters section.

  3. Select SiWx917 board from the displayed list.

    Note: If you don't have the SiWx917 board or you have not connected it to your computer, you can still view the example projects from the Launcher:

    • Select the Launcher from the toolbar.

      Select LauncherSelect Launcher

    • In the My Products section, search for SiWG917.

      Board Selection from My ProductsBoard Selection from My Products

    • Alternatively, you may select All Products on the Launcher page and search for EFR32xG24.

      All ProductsAll Products

      All ProductsAll Products

  4. The Launcher page will display the selected 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.

    Note: We recommend using the Wi-Fi - STATION PING (SOC) example with this guide.

    Select ExampleSelect Example

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

    Click FinishClick Finish

Configure an Application#

Configure the settings for your example. For Wi-Fi - STATION PING (SOC) (the recommended example for this guide) or for other examples, see the Application Build Environment section in the README page for configuration instructions.

Note:

  • You may use the Component Editor to configure the components in your example.

  • You may use the Pintool to configure the pin mappings in your project for your SiWx917 system-on-chip.

Build an Application#

Note: If you upgraded from a SiSDK (formerly GSDK) version earlier than v4.4.0, please upgrade your GNU ARM Toolchain. See the GNU ARM v12.2.1 Toolchain section.

  1. Launch 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 OptionSelect Build Option

Note: See the troubleshoot an application build section in case of failure in building the application.

Console Input and Output#

  1. Connect your WPK board to your computer.

  2. Open Simplicity Studio.

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

  4. The Adapter FW field shows your WPK 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 WPK FirmwareUpgrade WPK Firmware

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

  7. In the Debug Adapters pane, right-click on your SiWx917 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

Flash an Application#

Note: The SiWx91x SoC comes pre-flashed with a bootloader. A bootloader image does not need to be flashed separately.

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

Once you flash the Wi-Fi - STATION PING (SOC) example (the recommended example for this guide), you may refer to the Test the Application section of its README page to explore its output. The other sections of the README like the Purpose/Scope section and Overview section (not present in some README's) provide more information about the example.

See the Examples page to explore all available examples and view their README pages.

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

Note: See the troubleshoot an application flash failure section in case the application fails to flash.

Flash an Application Binary#

Note: Only .rps format application images can be flashed on the SiWx917 SoC chipset.

  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 in your computer's file system, 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. The instructions to flash the application binary are almost the same as those for flashing an SiWx91x firmware file, except for the point noted below:

    • Instead of choosing the SiWx91x firmware file, select the .rps you obtained in step 1 above.

    Note:

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

    • The SiWx91x SoC device expects a .rps format application file to be loaded into it (Other file formats are not supported).

    Browse the fileBrowse the file

Note: See the troubleshoot an application flash failure section in case the application fails to flash.

Run the Application#

Once you flash the example, you may refer to the Test the Application section of its README page to explore its output.

The other sections of the README like the Purpose/Scope section provide more information about the example.

See the Examples page to explore all available examples including their supported host interfaces (SPI and/or UART) and to view their README pages.

Note: See the troubleshoot an application run failure section in case the application fails to run.

Enable Additional Logs#

This section provides instructions to capture additional logs to help in troubleshooting application issues. The captured logs provide information about the data exchanged between the application processor and network connectivity processor on the SiWx91x chipset.

  1. Open your project in Simplicity Studio.

  2. Navigate to the following path in the project folders: components/device/silabs/si91x/wireless/threading

  3. Open the file sli_si91x_multithreaded.c.

  4. Make the changes illustrated below and save these changes.

    Enable inter-processor tx logsEnable inter-processor tx logs

    Enable inter-processor rx logsEnable inter-processor rx logs

  5. Select Edit in SDK in response to the warning message displayed.

    Note: This will apply the changes to all of your projects. You can revert these changes by following step 4 in reverse followed by this step.

    Enable Logs Edit in SDK WarningEnable Logs Edit in SDK Warning

  6. Build and flash your project.

  7. Additional logs will be displayed similar to the example below. Commands from application to network processor are shown beginning with <>>>> Tx while responses/events from the network to application processor are shown beginning with ><<<< Rx

    • queueId represents the internal command queue used in the SDK.

    • frameId represents the type of command (such as join or scan). Ideally, a Tx frameId will have a matching Rx frameId representing the response to the command.

    • frameStatus represents the success/failure code returned from the command. A value of 0x0 indicates success while a non-zero value indicates an error. See the Status Codes section for details.

    • length represents the length of the packet.

    8/14/2024 12:04:46.207 [RX] - ><<<< Rx -> queueId : 4, frameId : 0x89, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0x10, length : 40
    ><<<< Rx -> queueId : 4, frameId : 0x10, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0xc7, length : 3
    ><<<< Rx -> queueId : 4, frameId : 0xc7, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0xc8, length : 12
    ><<<< Rx -> queueId : 4, frameId : 0xc8, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0x11, length : 1
    ><<<< Rx -> queueId : 4, frameId : 0x11, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0x12, length : 0
    ><<<< Rx -> queueId : 4, frameId : 0x12, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0x1d, length : 4
    ><<<< Rx -> queueId : 4, frameId : 0x1d, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0xbe, length : 4
    ><<<< Rx -> queueId : 4, frameId : 0xbe, frameStatus: 0x0, length : 1604
    <>>>> Tx -> queueId : 4, frameId : 0xa0, length : 1
    ><<<< Rx -> queueId : 4, frameId : 0xa0, frameStatus: 0x0, length : 1604
    
    Wi-Fi client interface init success
    <>>>> Tx -> queueId : 4, frameId : 0x4a, length : 0
    ><<<< Rx -> queueId : 4, frameId : 0x4a, frameStatus: 0x0, length : 1604
    
    Device MAC address: 8c:65:a3:19:b0:60
    <>>>> Tx -> queueId : 4, frameId : 0xe0, length : 0
    ><<<< Rx -> queueId : 4, frameId : 0xe0, frameStatus: 0x0, length : 1604

Configure the 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.

  7. Unselect the Set breakpoint at field.

  8. Click Apply and click Debug.

    Debug ConfigurationsDebug Configurations

Debug an Application#

Note: The steps below are instructions to debug using Simplicity Studio. If you prefer to use the Ozone tool for debugging, follow the instructions in the Debug an Application with Ozone section.

  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.

Note: See the troubleshoot an application debug failure section in case the application fails to flash.

Debug an Application with Ozone#

This section contains alternative instructions for debugging, using the Ozone tool instead of Simplicity Studio.

Configure Ozone#

  1. Navigate to the folder path resources/ozone_config under your WiSeConnect 3 extension path.

    Note:

    • You must upgrade to WiSeConnect 3 extension version 3.3.2 or later in order to see the above path. If you want to use an older extension version, the siwx917.jdebug and siwx917.svd files can be downloaded directly from the Github repo.

    • The WiSeConnect 3 extension path is the one where the extension was downloaded during installation. If you are not sure what the path is, 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

  2. Open the Ozone configuration file siwx917.jdebug.

  3. Update the absolute path to the siwx917.svd file next to Project.AddSvdFile.

    Note: If you are using WiSeConnect 3 extension version 3.3.2 or later, the siwx917.svd file is present in the same folder as siwx917.jdebug.

  4. Update the serial number of your SiWx917 part next to Project.SetHostIF.

    • The serial number is shown in Simplicity Studio when you plug in your device, as seen in the second image below.

    Update jdebug pathUpdate jdebug path

    Serial Number in StudioSerial Number in Studio

Debug with Ozone#

  1. Update the connectivity firmware image that you intend to debug.

  2. Flash the application binary that you intend to debug.

  3. Download and launch Ozone.

  4. Ignore the following window if it is displayed.

    Ozone Launch OptionsOzone Launch Options

  5. Select File > Open....

  6. Navigate to and select the configured siwx917.jdebug file.

    Open .jdebug FileOpen .jdebug File

  7. The Open File window is shown for opening the application binary file.

  8. Navigate to and select either the .axf or the .out application binary file generated on building your Simplicity Studio project.

    Open application binaryOpen application binary

  9. Click Continue on the Project Load Diagnostics warning window if it is displayed.

    Project Load Diagnostics WarningProject Load Diagnostics Warning

  10. Select Attach & Halt Program in the dropdown next to the Power button on the top left hand corner of the screen.

    Attach and Halt ProgramAttach and Halt Program

  11. Select Reset & Break At Symbol in the dropdown next to the Play/Pause button on the top left hand corner of the screen.

  12. The attached SiWx917 device will be reset.

  13. To run the application, click the Resume/Halt button next to the Power button on the top left hand corner of the screen.

    Reset and Break at SymbolReset and Break at Symbol

Customize Application Components#

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

Note: For information about the functional components available with WiSeConnect SDK v3.x, see the Application Components section.

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

    Note: Image is for illustration only. Component details shown may be outdated.

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

    Component Added SuccessfullyComponent Added Successfully

    Note: Image is for illustration only. Component details shown may be outdated.

    Note: You may use the Component Editor to configure a component after adding it or to configure other components in your example.

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

    Note: Image is for illustration only. Component details shown may be outdated.