Getting Started with WiSeConnect™ SDK v3.x and EFR32™ Host in NCP Mode#

This guide describes how to get started with developing an application for the SiWx91x™ chipset family using the WiSeConnect™ SDK v3.x with an EFR32™ host in Network Co-Processor (NCP) mode, where the application runs on the EFR32 host and the connectivity stack runs 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 software and hardware requirements mentioned in this section are specific to the example(s) recommended with this guide in the Create a Project section. If you are working with a different example, refer to its README page for the software and hardware 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

  • Simplicity Commander

Note:

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

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 Host radio boards (hereafter referred to as EFR32 radio boards)

    • BRD4186C - EFR32xG24 Wireless 2.4 GHz +10 dBm Radio Board

    • BRD4271A - EFR32FG25 863-876 MHz +16 dBm Radio Board

  • BRD4346A - SiWx917 Wi-Fi 6 and Bluetooth LE 4MB Flash Co-Processor Radio Board (hereafter referred to as SiWx917 radio board)

  • BRD4357A - SiWx917 Wi-Fi 6 and Bluetooth LE 4MB Flash Co-Processor Radio Board (hereafter referred to as SiWx917 radio board)

  • BRD8045A - EXP Adapter Board for SiWx917 Co-Processors (hereafter referred to as adapter board)

  • Windows/Linux/MacOS computer with a USB port

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

Note: The SiWx917 Wi-Fi 6 and Bluetooth LE Co-Processor EXP Expansion Kit (SiWx917-EB4346A) comes with the SiWx917 radio board and adapter board mentioned above.

Setup Software#

You may setup the following software in this section which does not require having the hardware in hand.

Install Simplicity Studio#

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

  • Select Install by technology type in the Installation Manager window, and

    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) 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. In the Simplicity Studio home page, 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.

    Note: If you do not see WiSeConnect - 3.x.x extension under Simplicity SDK - 32-bit and Wireless MCUs, click on Check for Updates.

    Install from SDKs tabInstall from 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.

  • Ensure that you are using the SiSDK and WiSeConnect 3 SDK versions from the same release. To verify the SiSDK and WiSeConnect 3 SDK versions from a release, refer to the Release Details section of WiSeConnect 3 SDK Release Notes for NCP.

  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 EFR32 and SiWx917 boards to your computer.

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

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

    Click the Manage SDKs button for EFR32 boardClick the Manage SDKs button for EFR32 board

  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 the Boards to a Computer#

  1. Plug the EFR32 radio board into the radio board connectors of the WPK board as shown below.

  2. Plug the SiWx917 radio board into the radio board connectors of the adapter board as shown below.

  3. Connect the adapter board to the EXP header on the EFR32 WPK board.

  4. Make sure the UART switch on the adapter board is in the correct position depending on the type of interface between the SiWx91x device and the external MCU host:

    • For a serial peripheral interface (SPI), the switch must be in the USB position.

    • For a universal asynchronous receiver-transmitter (UART) interface, the switch must be in the HOST position.

      Note: For a universal asynchronous receiver-transmitter (UART) interface:

      • Connect the hardware flow control pins as shown below:

        BRD8045A Adapter board

        EFR32 WPK board GPIO Breakout Pad

        B0105 (RTS)

        F8/EXP3 (CTS)

        pin #35 on J101 (CTS)

        F9/EXP5 (RTS)

        HFC for EFR32 BoardHFC for EFR32 Board

      • Define the SL_SI91X_UART_HIGH_SPEED_ENABLE and SL_SI91X_UART_HFC_ENABLE macros to enable Hardware Flow Control.

  5. Make sure the PWR MODE switch on the adapter board is in the BUF position.

  6. Connect the EFR32 WPK board to your computer using a type C USB cable.

    EFR32 to SiWx917 ConnectionEFR32 to SiWx917 Connection

  7. Simplicity Studio will detect and display your EFR32 radio board.

    Studio Detects EFR32 BoardStudio Detects EFR32 Board

Troubleshoot Board Detection Failure#

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

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

  • Reset both the WPK board and adapter board by pressing the RESET button and RST button on the corresponding boards.

  • Power-cycle the EFR32 radio board by disconnecting and reconnecting the USB cable.

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 EXP expansion kit

  • you first receive an SiWx917 co-processor radio board, or

  • you upgrade or downgrade your WiSeConnect 3 extension

  1. Plug the SiWx917 radio board into the radio board connectors of the adapter board as shown below.

  2. Make sure the UART switch on the adapter board is in the USB position.

  3. Make sure the PWR MODE switch on the adapter board is in either the BUF or HOST position.

  4. Connect the adapter board to the EFR32 WPK board.

  5. Connect the EFR32 WPK board to your computer using a type C USB cable.

  6. Connect the USB port of the adapter board to your computer's USB port using a type C USB cable.

  7. Download Simplicity Commander and extract the downloaded archive. For example, the downloaded archive will be named SimplicityCommander-Windows.zip on Windows.

  8. Extract the commander_xxx archive present in the root folder of the Simplicity Commander archive extracted in the previous step (for example, Commander_win32_x64_1v16p10b1648 on Windows). In this example, 16 is the minor version, 10 is the patch version, and 1648 is the build number of the Simplicity Commander version downloaded.

  9. Navigate to the Simplicity Commander sub-folder under the commander_xxx archive extracted in the previous step.

  10. Double-click commander.exe to open Simplicity Commander.

    Open Simplicity Commander GUIOpen Simplicity Commander GUI

  11. In the Simplicity Commander window, select Utilities > Load RPS Image Over UART...

    Click to Load RPS ImageClick to Load RPS Image

  12. The Load RPS Image Over UART window is displayed.

    Load RPS Image Over UART windowLoad RPS Image Over UART window

  13. Click Browse next to the Select RPS Image field.

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

    Note:

    1. The connectivity_firmware/lite sub-folder can be ignored since the Lite OPN is not supported in NCP mode.

    2. The WiSeConnect 3 extension path is where the extension was downloaded during installation. If you're 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

  15. Under Select COM Port, select the COM port for the connected adapter board.

  16. Under Load RPS Image, make sure High-speed transfer is selected.

    Set up firmware updateSet up firmware update

    Note: When High-speed transfer is selected, Simplicity Commander sets the baud rate to 921600 before performing the firmware update.

  17. Press the RST button on the adapter board.

    SiWx917 NCP firmware update modeSiWx917 NCP firmware update mode

  18. Click Load RPS to update firmware.

    Click Load RPSClick Load RPS

    Uploading fileUploading file

    Note: It takes around 2 minutes to perform a firmware update.

  19. On successful firmware update, the following message is displayed: "RPS image loaded successfully!".

    Firmware update doneFirmware update done

Create a Project#

  1. Connect the EFR32 and SiWx917 boards to your computer.

  2. Go to the Debug Adapters section.

  3. Select the detected EFR32xG24 radio board from the displayed list.

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

    • Select the Launcher from the toolbar.

      Select LauncherSelect Launcher

    • In the My Products section, search for EFR32xG24.

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

    Note:

    • The following example is recommended for your first project, depending on the type of host connection:

      • Wi-Fi - Station Ping (NCP) - For connection over SPI

      • Wi-Fi - Station Ping (UART NCP) - For connection over UART

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

    Click FinishClick Finish

Configure an Application#

Configure the settings for your example, as described in the Application Build Environment section in the README page of your example.

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, upgrade your GNU ARM Toolchain. See the GNU ARM v12.2.1 Toolchain section.

  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

Console Input and Output#

The method for exchanging data with the EFR32 host depends on the type of interface between the EFR32 host and the SiWx91x device.

Console Input and Output with a SPI Interface#

  1. Connect your EFR32 and SiWx91x boards to your computer.

  2. Open Simplicity Studio.

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

    Launch ConsoleLaunch Console

  4. Select the Serial 1 tab.

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

  6. This completes the console setup for SPI interface. After you flash and run the application, the console output will start getting displayed in the Serial 1 tab.

    Serial 1 Tab for Console OutputSerial 1 Tab for Console Output

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

    Serial 1 Tab for Console InputSerial 1 Tab for Console Input

Console Input and Output with a UART Interface#

  1. Download and install J-Link Sofware from https://www.segger.com/products/debug-probes/j-link/tools/rtt-viewer/.

  2. Connect your EFR32 and SiWx91x boards to your computer.

  3. Before we start streaming the logs over RTT, make sure you have entered the desired execution mode.

    • Using Flash an Application:

      • If the application is executed in "Run As", RTT can connect to the device after the application is flashed onto the device.

        Simplicity Studio Run asSimplicity Studio Run as

    • Using Debug an application:

      • If the application is executed in "Debug As", first we must enter the debug window and step over the sl_system_init() function so that the RTT block is initialized for logging as shown below.

        Simplicity Studio Debug asSimplicity Studio Debug as

        Simplicity Studio Step OverSimplicity Studio Step Over

  4. Open J-Link RTT viewer.

    Open RTT ViewerOpen RTT Viewer

  5. The device configuration dialog box is displayed.

  6. Make sure the correct device is specified in the Specify Target Device field.

  7. Enter the other fields as shown in the screen shot below.

  8. Click OK.

    RTT Device ConfigurationRTT Device Configuration

    Note: You must click File > Disconnect to close the RTT connection (if already connected) before initiating the debugging or flashing of an application.

  9. Logs will be displayed in the RTT terminal once connection is successfull.

    RTT LoggingRTT Logging

  10. For the application which requires user input:

    • Select Input > End of Line... > Windows format (CR + LF) from the menu to set the end-of-line characters.

      RTT End-of-line SettingRTT End-of-line Setting

    • Select Input > Sending... > Send on Enter from the menu so that the entered input is sent to the EFR32 chipset when you click Enter.

      RTT Send-on-enter SettingRTT Send-on-enter Setting

    • To send user input, enter data in the input box below the terminal output and click Enter.

      RTT User InputRTT User Input

    • Transmitted user input is shown on the RTT terminal in green.

      RTT user input responseRTT user input response

Flash an Application#

Note: Make sure the bootloader image is flashed separately on to the EFR32 host MCU. Refer to the Simplicity SDK (formerly Gecko SDK) Bootloading Reference for more information.

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

Note: See the troubleshooting section in case the application fails to flash.

Flash the Application Binary#

  1. If the binary was built as described in the Build an Application section, a file with a .s37 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 .s37 file and select Show In > System Explorer.

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

      NCP mode s37NCP mode s37

      Browse the s37 fileBrowse the s37 file

  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 .s37 you obtained in step 1 above.

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

Troubleshoot an Application Flash Failure#

The application may fail to flash for one of the following reasons:

  • Error code 102 is displayed in the logs, indicating that ISP mode is enabled. Try the following steps:

    • Press and hold the ISP button on the radio board.

    • Press and release the RESET button on the WPK board.

    • Release the ISP button on the radio board.

    • Retry flashing the application.

  • "Could not connect debugger. Could not connect to target device" is displayed in the logs, indicating that the application processor is in a low power state with no flash access. Try the same steps as those described above for error 102.

  • Unknown reason - try re-launching Simplicity Studio.

  • Studio failed to detect your board. See the Troubleshoot Board Detection Failure section.

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.

Debug an Application#

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

    Switch to Debug ModeSwitch 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 an 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

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

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 a ComponentInstall a Component

    Note: The image is for illustration purposes only. Component and other details may not exactly match the product.

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

    Component Added SuccessfullyComponent Added Successfully

    Note: The image is for illustration purposes only. Component and other details may not exactly match the product.

    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 acComponentUninstall acComponent

    Note: The image is for illustration purposes only. Component and other details may not exactly match the product.