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#
Software#
Simplicity Studio
Gecko software development kit (GSDK)
Tera Term version 4.106 or later
Note:
We recommend using the latest GSDK version.
Refer to the Release Notes for the GSDK version tested with this release.
Hardware#
Wi-Fi Access Point (802.11 ax/b/g/n)
BRD4002A - Wireless Pro Kit Mainboard (hereafter referred to as WPK board).
BRD4186C - EFR32xG24 Wireless 2.4 GHz +10 dBm Radio Board (hereafter referred to as EFR32 radio board).
BRD4346A - 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
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).
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 while waiting to receive the hardware:
Install Simplicity Studio#
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.
Install the GNU ARM v12.2.1 Toolchain#
Note: From v4.4.0 on, Gecko SDK (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.
Log in to Simplicity Studio if not already done.
In the Simplicity Studio home page, select Install > Manage installed packages.
Select the Toolchains tab.
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.
The toolchain will be installed.
Close the Installation Manager window.
Click Preferences.
Expand the Simplicity Studio section in the Preferences dialog and select the Toolchains section.
Select GNU ARM v12.2.1 and un-select all other toolchains shown.
Click Apply and Close.
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 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:
Installation Manager (recommended)
Manage SDKs Window (hardware required)
Install WiSeConnect 3 through the Installation Manager#
Log in to Simplicity Studio if not already done.
In the Simplicity Studio home page, select Install > Manage installed packages.
Select the SDKs tab.
Next to the WiSeConnect - 3.x.x extension, click Install.
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.
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.
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>
Launch Simplicity Studio and log in.
Connect the EFR32 and SiWx917 boards to your computer
In the Debug Adapters pane, select your radio board.
In the General Information section, click Manage SDKs.
The Preferences window will be opened in the SDKs section.
Select Gecko SDK Suite vx.x.x and click Add Extension.
In the Add SDK Extensions window, click Browse.
Locate and select the
wiseconnect-3.x.x
sub-folder extracted in step 2 above which contains the source code.Studio will detect the WiSeConnect 3 SDK extension.
Select the detected extension and click OK.
If a Verify SDK Extension popup is displayed, click Trust.
The selected WiSeConnect 3 extension will be displayed.
Click Apply and Close.
Connect the Boards to a Computer#
Plug the EFR32 radio board into the radio board connectors of the WPK board as shown below.
Plug the SiWx917 radio board into the radio board connectors of the adapter board as shown below.
Connect the adapter board to the EXP header on the EFR32 WPK board.
Make sure the UART switch on the adapter board is in the right position depending on the type of interface between the SiWx91x device and the external MCU host:
In case of a serial peripheral interface (SPI), the switch must be in the USB position.
In case of a universal asynchronous receiver-transmitter (UART) interface, the switch must be in the HOST position.
Make sure the PWR MODE switch on the adapter board is in the BUF position.
Connect the EFR32 WPK board to your computer using a type C USB cable.
Simplicity Studio will detect and display your EFR32 radio 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.
Upgrade the SiWx91x Connectivity Firmware#
We recommend that you upgrade the SiWx917 connectivity firmware to the latest available version when:
you first receive an SiWx917 EXP expansion kit.
you first receive an SiWx917 co-processor radio board.
you upgrade to a new version of the WiSeConnect 3 extension
Disconnect the adapter board from the EFR32 WPK board, so that the host MCU connections do not interfere with the firmware upgrade process.
Plug the SiWx917 radio board into the radio board connectors of the adapter board as shown below.
Make sure the UART switch on the adapter board is in the USB position.
Make sure the PWR MODE switch on the adapter board is in the BUF position.
Connect the USB port of the adapter board to your computer's USB port using a type C USB cable.
Open the
teraterm.ini
file present in the Tera Term installation path (for example,C:\Program Files (x86)\teraterm
).Find the
KmtLongPacket
setting and update it toon
if not already set.KmtLongPacket=on
Note: Enabling the Transmit/Receive Extended-length Packets feature (
KmtLongPacket
) reduces the firmware update time from approximately 7 minutes 15 seconds to approximately 1 minute 35 seconds along with the baud rate settings described in the following steps.Set up Tera Term. The instructions for setting this up are the same as those for RS9116.
Hold down the RST button on the adapter board.
Hold down the ISP button on the SiWx917 radio board.
Release the RST button followed by the ISP button.
Enter the characters |U while holding down the Shift button.
The bootloader menu is displayed.
Press the b key to change the baud rate of the SiWx917 UART interface.
A menu of available baud rates is displayed.
Press 4 to change the baud rate to 921600.
Select "Setup > Serial port..." from the Tera Term menu.
Change the Speed to 921600.
Click New setting.
The dialog will close and you will be returned to the terminal screen.
Press U.
The following message will be displayed: "Baud Rate was updated successfully!"
Note: With the increased baud rate, the firmware will be flashed and loaded in approximately 1 minute 35 seconds, with a firmware file of approximately 1.6 MB.
From here the steps are almost the same as the RS9116 firmware update instructions from STEP 2 onwards, except for the steps noted below:
In STEP 4 of the RS9116 instructions, 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.
When the upgrade is complete, the following messages will be seen.
Create a Project#
Log in to Simplicity Studio and connect the EFR32 and SiWx917 boards to your computer.
Go to the Debug Adapters section.
Select your radio board from the displayed list.
The Launcher page will display the selected radio board's details.
Select the OVERVIEW tab.
Verify the following in the General Information section:
The Debug Mode is Onboard Device (MCU).
The Preferred SDK is the version you selected earlier.
Note: The image above is for illustration only and the Gecko SDK version shown is outdated. See the Software section for the currently supported GSDK versions.
Select the EXAMPLE PROJECTS AND DEMOS tab.
Locate the example you want and click CREATE.
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 - SNTP Client (NCP) - For connection over UART
In the New Project Wizard window, click FINISH.
Note: The Copy contents option is not currently supported.
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.
Configure an Application#
Configure the settings for your example, as described in the Application Build Environment section in the README page of your example:
Wi-Fi - STATION PING (NCP) (recommended example over SPI) - Application Build Environment
Wi-Fi - SNTP Client (NCP) (recommended example over UART) - Application Build Environment
You may use the Component Editor to configure the components in your example.
Build an Application#
Launch Simplicity Studio and log in.
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.
Flash an Application#
Note: Make sure the bootloader image is flashed separately on to the EFR32 host MCU. Refer to the Gecko SDK Platform Bootloading Reference for more information.
There are two alternative methods to flash an application to the application processor of the SiWx91x device:
Once you flash the example, you may refer to the Test the Application section of its README page to explore its output:
Wi-Fi - STATION PING (NCP) (recommended example over SPI) - Test the Application
Wi-Fi - SNTP Client (NCP) (recommended example over UART) - Test the Application
The other sections of the README like the Purpose/Scope section and Overview section (where available) 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#
Build the application as described in the Build an Application section.
In the Project Explorer pane, right-click on your project name and select Run As > 1 Silicon Labs ARM Program.
The application binary will be flashed on the radio board and the application will start running.
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#
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.
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.
Debug an Application#
In the Project Explorer pane, select your project name.
From the menu, select Run > Debug As > 1 Silicon Labs ARM Program.
Studio will switch to debug mode and halt execution at the
main()
function in your application.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).
Execution will halt at the break point.
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).
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 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).
Retry debugging the application.
For additional tips, see the Troubleshoot an Application Flash Failure section. Follow the suggested steps and then, instead of retying the flashing of the application, retry debugging the application.
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#
Connect your EFR32 and SiWx91x boards to your computer.
Open Simplicity Studio.
In the Debug Adapters pane, right-click on your radio board and click Launch Console.
Note: The image is for illustration purposes only. Board names and other details may not exactly match the product.
Select the Admin tab and press Enter to see the
WPK>
prompt.Enter the following command to set the baud rate:
pti config 0 vuart 115200
Select the Serial 1 tab.
Place the cursor inside the text input field and hit Enter.
Console output will start getting displayed in the Serial 1 tab.
Console input can be entered and sent to the device.
Console Input with a UART Interface#
Connect your EFR32 and SiWx91x boards to your computer.
Open Simplicity Studio.
From the menu, select Tools.
In the Tools dialog, select Simplicity Commander and click OK.
In the Simplicity Commander window, click Select Kit and choose your radio board.
In the navigation pane, go to the Console section.
In the Console section, select the RTT tab.
Note: If you are debugging an application, you must do the following before establishing the RTT connection:
Initiate the debugging as described in the Debug an Application section,
Make sure debug mode is active,
Step over the
sl_system_init()
line in the code in order to initialize RTT logging.
Make sure Reset target on connect is un-checked.
Click Connect.
Console output will start getting displayed in the RTT window.
Note: You must click Disconnect to close the RTT connection before initiating a new debug session.
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#
In the Project Explorer pane, double-click the project_name.slcp file.
Select the SOFTWARE COMPONENTS tab.
Select the SDK Extensions filter.
Browse or search for and select the component that you want to install.
Click Install.
Note: The image is for illustration purposes only. Component and other details may not exactly match the product.
Studio will add the component and display a success message.
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#
View the list of WiSeConnect 3 extension components by following steps 1-3 of the previous section.
Select the Installed filter to view the components you have installed.
Browse or search for and select the component you want to remove.
Select the component and click Uninstall.
Note: The image is for illustration purposes only. Component and other details may not exactly match the product.