As of the Q3 2017 release of Simplicity Studio, the Hardware Configurator allows you to set up USARTs for UART, with many options such as Virtual COM (VCOM), Virtual UART (VUART), and configure the many options and pins within the HWCONF interface for Zigbee, Thread, Flex/RAIL and even the Gecko Bootloader. Conveniently, these settings can be shared among stacks by importing the .hwconf file.
Here is a quick overview of the key requirements for setting up your serial ports and some tips which may not be immediately obvious.
The Serial section contains the following buttons: Serial, Virtual COM and Virtual UART
Clicking on the Serial button displays the Serial Properties to the right, but you need to check the box to enable it.
When you enable Serial, you need to decide where the signal is directed, either to a physical UART on one of the USART peripherals, in which case you must enable the corresponding USARTx peripheral module, or the Virtual UART (VUART), in which case you must enable the Virtual UART peripheral block and set the output method (usually SWO). SWO is a normal function of the SerialWire/JTAG [SWJ] peripheral, so you’re not precluding debug by enabling this.
USART ports can be separately selected for Application serial comms, and Asserts. Note: in EmberZNet and SL-Thread, most asserts are sent via the Application comms.
You can configure Wake from GPIO RX and must select the LEUART or the USARTs for serial.
One of the USART0, USART1, USART2, USART3, LEUART0 and VUART peripherals must be selected in the Serial peripheral, but they must also be configured and selected in the Peripherals section as well.
To use them, SPI NCP and UART NCP need to have USART ports selected, along with a few other pins.
VCOM is only for WSTK interaction when you’re routing VCOM_TX/RX lines from a physical USART back through the WSTK board controller for hosting through the USB/Ethernet console rather than the expansion header. The check box in Hardware Confgiurator is used to select the pin that will be driven high to enable VCOM. This is usually PA5, but check your radio card Reference Manual to confirm. (For example search for VCOM_ENABLE in www.silabs.com/documents/public/reference-manuals/brd4151a-rm.pdf)
If you don’t pick the correct pin, you won’t get VCOM and will need to view the serial I/O through the EXP Header on the WSTK. If you try to set the picklist for the pin to “Disable” it’s just floating the pin, which gives you ambiguous behavior, unless you add init code as shown in the note below.
EXP (Expansion Port) Hardware UART
When VCOM is not set up, the UART will come out as TTL signals on the WSTK expansion port pins.
Important: As of December 1, 2017, simply disabling Virtual COM in Hardware Configurator will not achieve this setting; to send UART out via EXP on WSTK, follow these steps:
VUART provides serial communications over Serial Wire (SWO) or RTT (Real Time Terminal). It uses fewer pins and runs faster than a traditional UART connection (500kbps). To enable it:
Turn on Serial and Virtual UART(and turn off Virtual COM). In Serial, pick VUART as the Application and Assert comms. In Virtual UART, set the VUART Type to SWO (less commonly, to RTT). Turn off all of the USART/LEUART peripherals.Turn on the GPIO peripheral and in most cases leave the value at the default PF2 pin.
In Simplicity Studio, you'll see VUART on the Serial0 tab of the Console or via telnet on port 4900.
Important: As of December 1, 2017 there is an open bug where the required baud rate value is not set for Virtual UART in the hal-config.h file, so you'll need to add it manually (use 115200):
Near, but outside the // $[SERIAL] ... //[SERIAL]$ block, add
#define HAL_SERIAL_APP_BAUD_RATE 115200
(Note that items inside the // $..// $ tags will get written over anytime Hardware Configurator changes, which is why you should put this line outside of the tags)
SERIAL TIPS AND TRICKS
The EFR32MG12 and later devices (MG13, MG14) list EM2 sleep current in the datasheet with voltage scaling enabled. However, the default energy mode configuration for EM2 is voltage scaling disabled. To enable voltage scaling, select the "DefaultMode Peripherals" tab of the hwconf file and click on the EMU peripheral.
In the properties window, change the property "EM2/3 voltage scaling level" from "Fast wake-up" to "Low power".
Click the Save icon and then Generate and Build your project.
Note: A feature request has been logged to enable voltage scaling in EM2 mode for sleepy device types selected in AppBuilder.
The End Device Timeout Request command is sent by an end device informing its parent of its timeout requirements.This allows the parent the ability to delete the child entry from the neighbor table if the child has not communicated with the parent in the specified amount of time.(For more details please refer to zigbee Specification Revision 22).Stack will send End Device Timeout Request Command to praent automaticaly when the sleep end device join/rejoin to the network.User can modify the timeout value through modifying EMBER_END_DEVICE_POLL_TIMEOUT and EMBER_END_DEVICE_POLL_TIMEOUT_SHIFT.The timeout value in seconds is EMBER_END_DEVICE_POLL_TIMEOUT<< EMBER_END_DEVICE_POLL_TIMEOUT_SHIFT.
Silicon Labs is the vendor of choice for OEMs developing Zigbee and Thread networking into their products by providing reliable, low-power, secure, and scalable networking solution for connecting Things to the IoT. The Silicon Labs EmberZNet platform is the most integrated, complete and feature rich Zigbee solution available. While the Silicon Labs Thread platform is a proven IPv6-based mesh networking protocol. Both solutions help accelerate time to market with the most reliable, scalable and advanced Zigbee and Thread software, supported by best-in-class development tools.
Requirements for Stack Access
Access to our wireless mesh stacks requires the purchase of one of our full mesh networking development kits (such as the EFR32 Mighty Gecko Wireless Starter Kit, the EM35x Mesh Networking Development Kit or the Samsung ARTIK 030 Development Kit) or being a contract manufacturer for an existing customer (contact your FAE for these requests).
This does not include non-mesh wireless development kits, like the Flex Gecko or Blue Gecko kits. And unfortunately at this time, the Thunderboards (React, Sense and Sense 2), ETRX Development Kits and the Connected Home Reference Designs do not grant access to our stacks.
It is important for customers to have one of Silicon Labs development kits as they provide a complete mesh networking platform environment to develop and deploy successful ZigBee and Thread applications. With multiple nodes you can develop a complete mesh network and the WSTK development boards provide a full JTAG debugging and programming solution.
To unlocking stack access.
First locate your development kit software serial number. The location of the serial number depends on your development kit:
EM35x Development Kit - a 24-digit hex number found on the bottom right of the back of the user quick start guide
Mighty Gecko Starter Kit - a 10-digit hex number found on the label on the side of the box
ARTIK 030 Development Kit - a 10-digit hex number found on the label on the side of the box
Once you have located the serial number, you can register you kit in one of two ways:
1. Log in to your portal account and register your software serial number at: https://siliconlabs.force.com/KitRegistration
2. Download and install Simplicity Studio.
From the launcher view, the Sign In menu includes a Kit Registration option
Once the registration is successful you will have access to our most recent stacks in Simplicity Studio v4 (required for use with the stack). All software and stacks can be found in the portal.
Contact support with any questions or problems.
Silicon Labs provides pre-built NCP images and sample NCP applications for different use cases in the stack. The customer has the option either use one of the pre-built NCP images or use sample NCP applications or a blank NCP application to build customised NCP application.
The below resopurces provide good information before continue with generating Smart Energy customized NCP image.
The AN1010 application note provides detailed guide about building a customised NCP appliocation.
You can find this here:
Another useful application note is AN714, this guide provides information about smart energy ECC-enabled device setup process.
You can find this here:
The KBA at below link provides information about the ECC libraries and adding them to the stack.
Although the customer cannot generate exactly NCP binary as pre-built, however if they use one of NCP sample applications and make below changes then they can generate a NCP image functionaly similar to pr-built NCP image.
The steps to generate smart energy NCP image similar to pre-built smart energy NCP image:
(1) Start a new customised NCP project based on one of sample NCP applications. You may select 'xncp-commshub-uart-dual' sample NCP application for ComsHub and 'ncp-uart-hw' for end device depending on your needs.
(2) Select the following plugins and do not change any other already selected plugins.
XNCP Stub Library
Zigbee PRO Stack Library
Zigbee Light Link Stub Library
Zigbee PRO Core Security Library
Security Link Keys Library
End Device Bind Library
Binding Table Library
ECC 163k1 Library
ECC 283k1 Library
CBKE Core Library
CBKE 163k Library
CBKE 283k Library
Install Code Library
CBKE DSA Verify Library
CBKE DSA Sign Stub Library
CBKE 283k DSA Verify Library
Packet Validate Library
Multi-Network Stub Library
GreenPower Stack Stub Library
Concentrator Support Library
(3) Select Zigbee PRO Stack Library plugin and set Child Table Size to 32. The other settings selected by sample NCP application are ok.
(4) Generate and build the project.
In our recent change to a new Community platform, some of our best KBAs were migrated but haven't been indexed for search. Until this occurs, we're collecting some of our most useful KBAs here to make them easily available and searchable by title:
Migrating to the new HAL Config file format for EFR32 (ZNet 5.10, Thread 2.3)
The attached document is a docx reference for the October release of the 6.0 ZNet Beta and the subsequent GA release of the 6.0 ZNet stack and the 2.4 Thread stack. If you do not have Microsoft Word, you can download the original .html reference in a .zip archive.
The stacks have a new Hardware Configurator which generates the #defines as seen in this document into the [part].hwconfig file and the config file for the particular stack, like hal-config.file or bootloader-configuration.h.
For anyone not using the HWConf or having unexpected outputs in the Beta release, this reference document provides the defines, values and dependencies for the hardware, clock and peripheral options.
For more context on these defines, this is an extension of the new HAL structure begun in the June 2017 release and described here:
The new defines are more uniformly named and implemented, but the system is very similar. If you have implemented the June 2017 version, it should be easy to see what the new defines and values are.
Any EFR32 can be easily turned into a Zigbee or Thread sniffer device using the Railtest sample application included in the free Flex SDK.
In order to do this follow the steps below:
Here are some steps you can follow to build an EZSP-UART host application with an EFR32MG1 or EFR32MG12 device (on our dev kit) running a pre-built NCP-UART image of the latest EmberZNet stack, which is v188.8.131.52 at the time of this article.
1. Create a new Silicon Labs AppBuilder Project in Simplicity Studio v4 of type "ZCL Application Framework V2", and choose the host (as apposed to SoC) flavor of the latest EmberZNet stack.
2. Choose a sample application, such as Z3Gateway.choose "Noon(compatible)" in Part tab. and click "Finish"
3. Generage the project without any modification.
4. Build the host application.
Building the Host application can be done on a Linux system(this sample built on Cygwin) and requires a number of development tools. We assume you have access to these tools. They are as follows:
• The standard C Library and its development headers
• The Readline Library and its development headers
• The Ncurses Library and its development headers
. Run "make" on the generated Makefile from the directory<\SiliconLabs\SimplicityStudio\v4_4\developer\sdks\gecko_sdk_suite\v2.0\app\builder\Z3GatewayHost> and the compilation should complete successfully.
5.Running the Host application
The USB port is either COM1, COM2, COM3, and so on. The following example uses COM19.
a. Launch a Cygwin Shell.
b. Navigate to the directory where the project is located, for example:cd /cygdrive/c/SiliconLabs/SimplicityStudio/v4_4/developer/sdks/gecko_sdk_suite/v2.0/app/builder/Z3GatewayHost/build/exe
c. Type the command: ./Z3GatewayHost.exe -n 0 -p COM19
The Silicon Labs Gecko Bootloader is a common bootloader for all the newer MCUs and wireless MCUs from Silicon Labs. The Gecko Bootloader can be configured to perform a variety of bootload functions, from device initialization to firmware upgrades. In this article, we will compare the difference between Legacy Bootloader and Gecko Bootloader for EFR32MG Devices on ZigBee side.
For EM35x devices and EFR32MG1x parts, usually, you can find the prebuild legacy bootloader for some part numbers in the following stack installation directory. For some EFR32MG1 QFN32 parts, we already had a KBA to discuss how to make customized ZigBee bootloader.
For EFR32MG12x/EFR32MG13x and newer parts, usually, you can only choose Gecko Bootloader for them. We don't provide the prebuild Gecko Bootloader right now, so custom need to build it by themselves, it is easy to build the Gecko Bootloader within Gecko Bootloader SDK, since there are many kinds of Samples in the SDK. Actually, for EFR32MG parts, no matter it is EFR32MG1x or EFR32MG12x(beyond) parts, we recommend custom to use Gecko Bootloader, since the Gecko Bootloader can be upgraded in the field.
Here are some tags for the difference between Legacy Bootloader and Gecko Bootloader: