Almost all of Silicon Labs Starter/Development Kits include an onboard J-Link debugger, which is great to not only debug and flash your embedded application, but also to run SystemView.
SystemView as you probably know is the tool to record and analyze your Micrium OS Kernel events in real time.
However, the onboard J-Link can be slow depending on the rate of kernel events that your embedded application is creating. Overflow events occur when the SystemView buffer on your embedded target is full.
In this blog I'm gonna discuss the basic steps to prevent overflows and then I will describe the ultimate way to prevent overflows.
1. Increase the buffer size to store the events:
Open the configuration file SEGGER_SYSVIEW_Conf.h and set the buffer size to 4096 as shown below:
#define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 4096
2. In case you are running Simplicity Studio, close Simplicity Studio and let SystemView run by itself.
3. In case you are running Probe, close Probe and let SystemView run by itself.
4. Open the configuration file os_cfg_trace.h and decrease the number of events by disabling the following features:
#define OS_CFG_TRACE_API_ENTER_EN DEF_DISABLED #define OS_CFG_TRACE_API_EXIT_EN DEF_DISABLED
5. If you are still having overflows after making the changes above, then the ultimate way to prevent overflows is to buy a much faster External J-Link from SEGGER: https://www.segger.com/products/debug-probes/j-link/
Most of our Starter Kits have a Debug Connector that you can use to connect the external J-Link.
The following section describes how to connect your external J-Link to a Silicon Labs Starter Kit.
1. First you need to configure your Starter Kit to reroute the debugging circuitry to the external debug connector.
Open Simplicity Studio, select your Starter Kit, locate the section Debug Mode: MCU and then press the link Change as shown in the image below:
2. You may be asked to download an adapter firmware image. If so, press the button Yes.
3. The default Debug Mode is called MCU which means that your debugger is the Onboard J-Link.
4. Select from the drop-down the option IN which means that your debugger is an External J-Link as shown in the image below:
5. Connect your external J-Link to the debug connector on your Silicon Labs Starter Kit.
Depending on your kit, it may be one of the ones shown below.
The J-Link 19-pin 0.05" Cortex-M Debug Connector shown in Figure 3 may require a J-Link 19-pin Cortex-M Adapter available from SEGGER.
On the other hand, the standard 20-pin 0.1" JTAG Debug Connector shown in Figure 4 does not require any adapters and can be connected directly to your external J-Link.
For more information on how to configure your Starter Kit in the appropriate debugging mode, please consult your Starter Kit's User's Guide, the section On-Board Debugger, Debug Modes.
SystemView Installer: https://www.segger.com/downloads/free-utilities/#SystemView
SystemView User's Manual: https://www.segger.com/downloads/free-utilities/#Manuals
J-Link Debug Probes: https://www.segger.com/products/debug-probes/j-link/
J-Link 19-pin Cortex-M Adapter: https://www.segger.com/products/debug-probes/j-link/accessories/adapters/19-pin-cortex-m-adapter/
Whether you are currently running your embedded application on Silicon Labs hardware or other semiconductor, the migration path is the same as illustrated in Figure 1.
You should start from a working Micrium OS example and then move your embedded application over to the example project.
Once you move your embedded application to the Micrium OS baseline example project, you need to change the code that calls the FreeRTOS API.
The purpose of the attached PDF document is to describe the differences between the two kernels, offer plenty of side-by-side examples and mapping tables to help you in the process of migrating your embedded application.
For the upcoming Embedded World tradeshow in Nuremberg, Germany, the Silicon Labs MCU team is showing off some unique ways to ease the challenges of developing cloud-connected applications. The demo consists of the EFM32 Giant Gecko 11 MCU, which is running Micrium OS and connects to Amazon Web Services via the new XBee3 cellular module from Digi International.
This particular demo is quite simple – a closed-loop system with an MCU monitoring a temp sensor and controlling a fan. However, the real-world use cases that these building blocks and tools can scale to serve are much more profound.
For example, many smart city applications including bridge sensors, parking meters, waste management sensors, and others often consist of portable sensor devices that require seamless long-range connectivity to the cloud. They may be battery powered with user demands of 10+ year battery life. They may have lots of sensor inputs and extra features like button inputs and local displays. Finally, they might need to be designed quickly, but with a long field-upgradeable lifetime in mind. These are the types of applications that this demo speaks to, with Micrium OS, Giant Gecko 11, and Digi’s XBee3.
Micrium OS is running on the MCU and helps modularize the application functions. It’s helping the MCU maintain communication with the cellular module, monitor the temp sensor, drive the TFT display, and update control settings when local push buttons are pressed. By using Micrium, these various pieces can easily be divided and coded in parallel without having to worry about any messy integration at the end. In fact, this is exactly what the Embedded World demo team did – three different development teams in three different cities built the demo, and Micrium was the underlying glue that made it seamlessly come together.
Another challenge being addressed here is the connectivity piece. As devices are now adding wireless connectivity, there are lots of hurdles to clear: RF design in some cases, FCC certifications, understanding wireless networking, security, and more. Not only does Silicon Labs offer homegrown, low power SoCs and modules, but now Digi helps add simple cellular connectivity. The Digi XBee3 is a plug-and-play NB-IoT module that has built-in security and is pin-compatible with 3G and LTE-M modules. It’s programmable via MicroPython and comes pre-certified so developers can focus more on the application itself.
This brings us to the developer’s main focus, the application. The Giant Gecko 11 is a new 32-bit energy friendly microcontroller from Silicon Labs, and our the most capable yet. It helps simplify complex, cloud-connected applications with its large on-chip memory (2MB/512kB), lots of flexible sensor interfaces, SW and pin compatibility with other EFM32 MCUs, and unique low power capability to help prolong battery life. For example, not only does Giant Gecko 11 allow for autonomous analog and sensing in “Stop Mode” (1.6 uA), but it also has Octal SPI interface for external data logging, which could be used to reduce cellular transmission duty cycling.
There is one more unique offering in this demo. Considering that cellular connectivity might not be the solution for all IoT applications, the SW compatibility of Giant Gecko 11 and all EFM32s with Silicon Labs Wireless Geckos makes it easy to migrate to another wireless SoC or module, if needed. For example, some use cases and markets may use NB-IoT (such as this demo), while others might need their own proprietary sub-GHz solution (Flex Gecko).
For more information about what we’re doing at Embedded World, click here: https://www.silabs.com/products/wireless/internet-of-things.
Play Impossible has reinvented the ball by connecting it to phones and tablets. They’ve managed to do this while maintaining the look and feel like a ball found on any gymnasium floor. Launched in October of last year, Play Impossible won first place at the Last Gadget Standing competition at CES in December. With rave reviews from USA Today, CNN, and Mashable, Play Impossible’s Gameball is capturing the hands and minds of kids as it provides another way to play ball with the modern insight of today’s connected devices. Silicon Labs had the opportunity to sit down with cofounder and CTO Kevin Langdon to hear how the company got its start and what he sees for the future.
How did Play Impossible come about?
All of the founders of the company are dads. And as parents, we have all struggled with the amount of time our kids spend on devices. This particular problem was the impetus for the company - how do we get our kids up off the couch in active play and doing what we call active play. Active play is physical and involves movement, but it’s also social and creative in nature. These are important things that many kids today aren’t getting enough of, and there are plenty of studies saying this is only getting worse. Getting kids to move and play is what Play Impossible is all about.
The quality of Gameball is amazing - it’s a real ball.
Yes. If you couldn’t see the charging part, most people would not know there are electronics inside of the ball. The quality of the ball was important to us, but that aspect of the product definitely was not in our wheelhouse, and we didn’t want to reinvent the process. So we partnered with Baden Sports, which specializes in sports equipment, to build the ball.
What were some of the original design requirements when you set out to create the ball?
We really wanted to create something with a reasonable price point, especially when it’s sitting on a shelf next to $5 balls in a retail setting. The connection range of the device was critical as well. We needed a Bluetooth to stay connected as far as you could throw the ball. Silicon Labs played a big role in helping us do this. Power was another issue – creating a solution that didn’t get in the way in terms of charging.
What was Silicon Labs’ value proposition in the beginning?
I first started looking at Blue Gecko when I was working on another product for SkyGolf. And then with Gameball, we looked at a lot of modules and realized the range and low-power functions were two pieces that we knew Silicon Labs could help with.
Were there any unforeseen challenges that you came across, such as weight, size, etc.
The hardest part for us was getting the durability right with all of the electronics inside. We also came up with a unique solution for the power. There is no battery in the ball, it runs entirely on super capacitors. We needed to do that for both cost reasons and to maintain the durability. I’m pretty happy with the solution we came up with - it’s a real jaw dropper when people see our ball charge up in 20 seconds.
What was the Last Gadget Standing competition at CES like?
There were hundreds of applicants and they narrowed it down to 10 gadgets on stage. I had no expectations of being selected, but when we were, we were honored. One of the gadgets was a Star Wars VR gadget, and it was two months after Star Wars had hit movie theaters. But it went really well and was a lot of fun. The host, David Pogue, was tough and asked a bunch of questions, but he loved the product.
What types of pressures are you under to be innovative – is it developing new games, cost of goods, talent? It’s definitely creating new games. It’s a combination of making the ball new again. Anyone who has a kid knows kids typically like a new toy for a few days, but then on the fourth day, the toy tends to be thrown into the closet. We want to make sure our product is played with a long time beyond those four days. The new games we create make the ball new again and give the kid a reason to get the Gameball back. We are driven to create hit games that are what everyone is talking about.
Is all of the production for Gameball done in house?
When we first started, we hired an experienced gaming designer to build the game, as it’s definitely not a traditional game. We had to do a lot of heavy prototyping and understand the software and hardware capabilities. We had to figure out what the product would be capable of doing socially and with Bluetooth and power. We definitely pushed the limits in terms of what we could do with those functionalities. For example, with a lot of IoT products, real time doesn’t matter. Of course it’s always important to be quick, but real time isn’t critical. With us, if you look at other playables on the market with Bluetooth, I don’t think there are any products as fast as Gameball. The game requires feedback from your fingers on the ball as quickly as possible to get the gestures from the beginning with the ball.
Where do you see the future of IoT going? And where do you see it expanding for the everyday person?
Right now, expectations are low among the average consumer of what IoT is all about. When our product is sitting on a shelf at a retail location, no matter how much we put on that box, there is little a consumer can understand about the product until they actually play with it. It’s going to take years for consumers to change and expect connectivity in everything. The nice thing is it’ll be much easier at that point for businesses such as ours. But today, it’s a critical issue for us in terms of marketing and sales. We see ourselves as a software platform that can interact with many different devices. Gameball is just the first of many devices and accessories that will change how we play in the future.
IoT Hero DeviceRadio Levels Playing Field for IoT Innovation
Just before the holidays, Silicon Labs had the chance to sit down with Christian Klemetsson, the founder of Swedish-based start-up DeviceRadio. The company has created a horizontal connectivity layer of technology that sits on top of various protocols supporting IoT products, such as Wi-Fi, LoRa, Bluetooth, etc. The seamless layer removes the need for specific IoT design expertise, giving companies and designers of all backgrounds immediate ability to build IoT products from the ground up, regardless of designer expertise.
Tell me about DeviceRadio – how did it come about?
The company started out as a hobby project. At the time, I was killing all of my houseplants and it was getting expensive to replace them. I have an electronics background, so I wanted to build some sort of solution to monitor the plants with an application on my phone. I quickly realized that building something cheap, simple, and with long battery life wasn’t available. The solutions I found were based on technology built for other purposes. For example, Bluetooth, at least at the time a few years ago, wasn’t built for IoT, only wireless peripherals. So I created my own radio protocol specifically for IoT and added encryption and plug and play along with additional features. Two and a half years ago, I found the Silicon Labs/Digi-Key competition and entered the device I had just built. I ended up being one of the winners and received $10,000 worth of components from Silicon Labs. I also received media attention in Sweden from the electronics press, and the overall feedback was that I was on the right track – there was a possible missing piece in IoT. From that starting point, I started DeviceRadio.
Was your IoT radio protocol the first one you’ve seen on the market?
At that point, (2014) there wasn’t anything specifically for IoT. There were protocols for low-power communications, such as Z-Wave and peripheral protocols, such as Bluetooth and Wi-Fi, but nothing for IoT.
What I did was transform the protocol into something that could be placed on top of existing protocols, which would provide encryption, plug and play, abstraction, etc. Regardless if you’re using Bluetooth, Wi-Fi, 4G, etc., it would all be the same. Our layer goes on top of whatever protocols you’re using, making everything seamless and consistent.
The product is sort of like the Internet, but specifically for devices and their sensor data and signals. We create the mechanism to move sensor data between each other and provide the integration to cloud platforms and services.
You call this horizontal connectivity, right? How would you explain the value of this concept to a non-developer?
I think it’s easier to talk about the value of Internet connected devices to help non-developers understand the value of our product. When working with today’s technologies to build connected devices, a lot of custom development and expertise is required. You need to know about security, servers, scaling, protocols, etc., and hook everything up to an IoT platform. This process becomes limiting and IoT development ends up being only available to a select few companies with this level of expertise.
What we’re trying to do is democratize and hide the complexity of IoT by placing a horizontal layer on top of everything. This means if you’re a product company, your developers can create an IoT product without relying on exclusive and hard-to-find talent.
Think about it from a macro perspective – western countries are all trying to increase efficiency, reduce environmental impact, and care for a large aging population. But developed countries are still the minority - the rest of the world doesn’t have basic services or our standard of living. Our resources are limited if we want to bring the entire world up to our living standards. The only way to solve these big problems is with technology. I think IoT can grow core technologies to do so much more. But in order for this to happen, IoT needs to be available to all companies, not just experts.
What exactly does the horizontal layer include?
We host an infrastructure for customers that can be replicated and takes care of access control and gets data to the right place. Our vertical communication layer is a software library that designers place on top of their protocol layers and hardware. By using our software library, designers don’t have to think about cloud APIs, Internet connectivity, etc.
We are giving designers the opportunity to create something fast without thinking much about what technology to use. Designers can create a prototype on their hardware and focus entirely on the benefit and business value of the device up front, worrying about technology and scaling requirements much later on in the process. Designers have the freedom to stretch the product further without having to rewrite the apps and alter the code.
Have you started selling the product?
Right now we’re doing small pilot and proof of concept projects. We also have additional funding from angel investors and government grants. We’re still in the development phase and we want to make sure we’re building the right product. Our pilot projects are giving us critical insights. Our goal is to increase the number of devices using DeviceRadio by 10-fold every six months.
What are some of the design challenges you have run into while building the product?
From a technical standpoint, there were plenty of challenges. But the biggest challenge I have seen is an awareness problem - getting the right awareness and feedback circulating among companies about IoT. There is so much hype and confusion because everyone wants to be a part of IoT. But the companies that can benefit the most don’t really know it exists and what the benefits are – I think that’s a big challenge.
So they don’t understand what’s possible?
Exactly, a lot of the IoT media attention is around must-have killer applications solving luxury problems, such as connecting a water bottle or something. One of the companies I spoke with recently is building drones that work with emergency services to deliver heart defibrillators in a fraction of the time they were previously delivered, using IoT to save lives.
What Silicon Labs products are you using?
Where do you see the future of IoT going in the next 5-8 years?
Even though there are some cool IoT start-ups and things happening, it’s really going to be about existing companies discovering how to leverage IoT in a way that’s seamless. If you’re building connected washing machines, it should work as a normal washing machine, but then have additional connected features or benefits. It needs to be a gradient, where we move from unconnected to a connected world, and eventually an interconnected one. Right now it’s vertical. The same company that builds the IoT product owns the servers, apps, etc., making everything isolated. In 5-10 years, you’ll have multiple companies building the hardware, IoT enablement technologies, and software services and apps, allowing people to utilize products from multiple companies in ways we can’t even imagine at the moment.