AI at the Edge - Can I run a neural network in a resource-constrained device?
Hello Related Communities,
This is my first time blogging since joining Stephane in November. He and I were at Embedded World together and he asked me to write about some of the important trends as they relate to all of you. I expect to post others in the near future, but the biggest trend in the embedded space was all of the activity around artificial intelligence (AI) at the edge.
This trend caught me a bit by surprise. I have been doing a lot of reading about AI over the last...
Introduction to Deep Insight Analysis for RTOS Based Applications
Over the past several years, embedded systems have become extremely complex. As systems become more complex, they become harder and more time consuming to debug. It isn’t uncommon for development teams to spend more than 40% development cycle time just debugging their systems. This is where deep insight analysis has the potential to dramatically decrease costs and time to market.
Defining Deep Insight Analysis
Deep insight analysis is a set of tools and techniques that can be...
From bare-metal to RTOS: 5 Reasons to use an RTOS
Developers can come up with amazing and convoluted reasons to not use an RTOS. I have heard excuses ranging from they are too expensive (despite open source solutions) all the way to they aren’t efficient and use too much memory. In some circumstances some excuses are justified but there are many reasons why a developer should look to an RTOS to help with their real-time scheduling needs.
From bare-metal to RTOS Quick LinksFrom Baremetal to RTOS: A review of scheduling techniques
Transitioning from bare-metal embedded software development to a real-time operating system (RTOS) can be a difficult endeavor. Many developers struggle with the question of whether they should use an RTOS or simply use a bare-metal scheduler. One of the goals of this series is to walk developers through the transition and decision making process of abandoning bare-metal thinking and getting up to speed quickly with RTOSes. Before diving into the details of RTOSes, the appropriate first step...
Choosing a Microcontroller for Your Vehicle
There are many things to take into consideration when choosing a microcontroller or microprocessor for your autonomous vehicle.
Voltage
Some processors run on 5V and others use 3.3V. Be sure to check the documentation before you buy. Make sure your supply has a high enough amp rating that your microcontroller doesn't lose pwer.
Power
Can the system run using batteries? Large, automotive sized vehicles can be run from large batteries or inverters in the vehicle. Smaller...
Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities
The insanely popular ARM Cortex-M processor offers very versatile interrupt priority management, but unfortunately, the multiple priority numbering conventions used in managing the interrupt priorities are often counter-intuitive, inconsistent, and confusing, which can lead to bugs. In this post I attempt to explain the subject and cut through the confusion.
The Inverse Relationship Between Priority Numbers and Urgency of the Interrupts
The most important fact to know is that ARM...
Cortex-M Exception Handling (Part 2)
The first part of this article described the conditions for an exception request to be accepted by a Cortex-M processor, mainly concerning the relationship of its priority with respect to the current execution priority. This part will describe instead what happens after an exception request is accepted and becomes active.
PROCESSOR OPERATION AND PRIVILEGE MODEBefore discussing in detail the sequence of actions that occurs within the processor after an exception request...
Metal detection: beat frequency oscillator
Plan Introduction Theory Electronics Software Tests ReferencesNext part: building the detector 1. IntroductionThis article discusses the implementation of a beat frequency oscillator (BFO) stage for metal detector. While they are mentioned here and there, the article does not detail other important electronic stages such as the power supply, and user interface, the coil or the detector frame. I may write other articles on these topics, and other detection methods.Before...
Analyzing the Linker Map file with a little help from the ELF and the DWARF
When you're writing firmware, there always comes a time when you need to check the resources consumed by your efforts - perhaps because you're running out of RAM or Flash or you want to optimize something. The map file generated by your linker is a useful tool to aid in the resource analysis. I wanted to filter and sort the data generated in an interactive way so I wrote a C# WinForms application that reads the data from the map and presents it in a list view (using the awesome
Mounting plate for Arduino
While having a breadboard with your microcontroller is necessary, it is very cumbersome if the two aren't fastened together somehow. You can buy mounting plates, but I choose to make one.
Designing Communication Protocols, Practical Aspects
For most embedded developers always comes the time when they have to make their embedded MCU talk to another system. That other system will be a PC or a different embedded system or a smartphone etc. For the purpose of this article I am assuming that we are in the control of the protocol between the two ends and we don’t have to follow something that is already in place on one side.
So let’s say that we have our embedded MCU, we have implemented and configured the USB stack (or just...
From Baremetal to RTOS: A review of scheduling techniques
Transitioning from bare-metal embedded software development to a real-time operating system (RTOS) can be a difficult endeavor. Many developers struggle with the question of whether they should use an RTOS or simply use a bare-metal scheduler. One of the goals of this series is to walk developers through the transition and decision making process of abandoning bare-metal thinking and getting up to speed quickly with RTOSes. Before diving into the details of RTOSes, the appropriate first step...
Introduction to Microcontrollers - More On Interrupts
A Little More Detail About The Interrupt MechanismIt's time to look a little closer at what happens in an interrupt request and response. Again this is in general terms, and different microcontroller designs may do things somewhat differently, but the basics remain the same. Most but not all interrupt requests are latched, which means the interrupt event sets a flag that stays set even if the interrupt event then goes away. It is this latched flag...
Understanding Microchip 8-bit PIC Configuration
The second post of a five part series picks up getting started developing with Microchip 8-bit PIC Microcontroller by examining the how and why of processor configuration. Topics discussed include selecting the oscillator to use during processor startup and refining the configuration once the application starts. A walk through of the code generated by the Microchip IDE provides a concrete example of the specific Configuration Word and SFR values needed to configure the project specific clock configuration.
Arduino robotics #1 - motor control
Arduino RoboticsBeginner robotics is a series of article chronicling my first autonomous robot build, Clusterbot. This build is meant to be affordable, relatively easy and instructive. The total cost of the build is around $50.
1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4.Round-robin or RTOS for my embedded system
First of all, I would like to introduce myself. I am Manuel Herrera. I am starting to write blogs about the situations that I have faced over the years of my career and discussed with colleagues.
To begin, I would like to open a conversation with a dilemma that is present when starting a project ... must I use or not any operating system?
I hope it helps you to form your own criteria and above all that you enjoy it.
Does my embedded system need an...
Learning A New Microcontroller
Contents:- Introduction
- The Peripherals
- System Complexity
- Support Software
- Do It Like Phil
- The Programs
- WET And DRY Code
Energia - program a TI MSP430 using Arduino sketches
TI MSP430 LaunchpadI started tinkering with microcontroller a couple of years ago with an Arduino Uno. I had a little experience with C, so programming in the Arduino environment has been relatively easy and straightforward for me. My code is not necessarily elegant or efficient, but I can usually figure out how to make an Arduino do what I want it to do eventually. A lot of credit to the Arduino userbase, as it is very easy to figure most things out with a quick Google...
Introduction to Microcontrollers - Further Beginnings
Embedded Programming BasicsThis tutorial entry will discuss some further embedded programming basics that you will need to understand before proceeding on to the LED blinky and other example programs. We will do this by looking at the general organization and types of instructions found in most microcontrollers, and how that organization and those instructions are reflected (or, in some cases, ignored) by the C programming language.
Basic CPU...Using a RTLSDR dongle to validate NRF905 configuration
I am currently working on a system to monitor the garage door status from my flat. Both places are 7 floors apart, and I need to send the data wirelessly. I chose to operate on the 433MHz carrier, and I ordered 2 PTR8000 modules: http://www.electrodragon.com/w/NRF905_Transceiver_433MHz-Wireless_ModuleThe PTR8000 is based on the dual band sub 1GHz NRF905 chipset from NORDICSEMI: http://www.nordicsemi.com/eng/Products/Sub-1-GHz-RF/nRF905I...Scorchers, Part 3: Bare-Metal Concurrency With Double-Buffering and the Revolving Fireplace
This is a short article about one technique for communicating between asynchronous processes on bare-metal embedded systems.
Q: Why did the multithreaded chicken cross the road?
A: to To other side. get the
There are many reasons why concurrency is
Round-robin or RTOS for my embedded system
First of all, I would like to introduce myself. I am Manuel Herrera. I am starting to write blogs about the situations that I have faced over the years of my career and discussed with colleagues.
To begin, I would like to open a conversation with a dilemma that is present when starting a project ... must I use or not any operating system?
I hope it helps you to form your own criteria and above all that you enjoy it.
Does my embedded system need an...
Trust, but Verify: Examining the Output of an Embedded Compiler
I work with motor control firmware on the Microchip dsPIC33 series of microcontrollers. The vast majority of that firmware is written in C, with only a few percent in assembly. And I got to thinking recently: I programmed in C and C++ on an Intel PC from roughly 1991 to 2009. But I don’t remember ever working with x86 assembly code. Not once. Not even reading it. Which seems odd. I do that all the time with embedded firmware. And I think you should too. Before I say why, here are...
Designing Communication Protocols, Practical Aspects
For most embedded developers always comes the time when they have to make their embedded MCU talk to another system. That other system will be a PC or a different embedded system or a smartphone etc. For the purpose of this article I am assuming that we are in the control of the protocol between the two ends and we don’t have to follow something that is already in place on one side.
So let’s say that we have our embedded MCU, we have implemented and configured the USB stack (or just...
C to C++: 3 Reasons to Migrate
I’ve recently written several blogs that have set the stage with a simple premise: The C programming language no longer provides embedded software developers the tools they need to develop embedded software throughout the full software stack. Now, don’t get me wrong, C is a powerhouse, with over 80% of developers still using it; however, as embedded systems have reached unprecedented levels of complexity, C might not be the right tool for the job.
In this post, I’m kicking...
C to C++: 5 Tips for Refactoring C Code into C++
The article titled "Simple Tips to Refactor C Code into C++: Improve Embedded Development" provides essential guidance for embedded developers transitioning from C to C++. The series covers fundamental details necessary for a seamless transition and emphasizes utilizing C++ as a better C rather than diving into complex language features. The article introduces five practical tips for refactoring C code into C++. Replace #define with constexpr and const: Discouraging the use of #define macros, the article advocates for safer alternatives like constexpr and const to improve type safety, debugging, namespaces, and compile-time computation. Use Namespaces: Demonstrating the benefits of organizing code into separate logical groupings through namespaces, the article explains how namespaces help avoid naming conflicts and improve code readability. Replace C-style Pointers with Smart Pointers and References: Emphasizing the significance of avoiding raw pointers, the article suggests replacing them with C++ smart pointers (unique_ptr, shared_ptr, weak_ptr) and using references
Learning A New Microcontroller
Contents:- Introduction
- The Peripherals
- System Complexity
- Support Software
- Do It Like Phil
- The Programs
- WET And DRY Code
Arduino robotics #3 - wiring, coding and a test run
Arduino RoboticsArduino robotics is a series of article chronicling my first autonomous robot build, Clusterbot. This build is meant to be affordable, relatively easy and instructive. The total cost of the build is around $50.
1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4.Choosing a Microcontroller for Your Vehicle
There are many things to take into consideration when choosing a microcontroller or microprocessor for your autonomous vehicle.
Voltage
Some processors run on 5V and others use 3.3V. Be sure to check the documentation before you buy. Make sure your supply has a high enough amp rating that your microcontroller doesn't lose pwer.
Power
Can the system run using batteries? Large, automotive sized vehicles can be run from large batteries or inverters in the vehicle. Smaller...
Getting Started with (Apache) NuttX RTOS - Part 1
NuttX RTOS is used in many products from companies like Sony, Xiaomi, Samsung, Google/Fitbit, WildernessLabs and many other companis. So, probably you are already using NuttX even without knowing it, like the you was using Linux on your TV, WiFi router more than 10 years ago and didn't know too! Today you will have the chance to discover a little bit of this fantastic Linux-like RTOS! Are you ready? So, let's get started!