Are We Shooting Ourselves in the Foot with Stack Overflow?
Most traditional, beaten-path memory layouts allocate the stack space above the data sections in RAM, even though the stack grows “down” (towards the lower memory addresses) in most embedded processors. This arrangement puts your program data in the path of destruction of a stack overflow. In other words, you violate the first Gun Safety Rule (ALWAYS keep the gun pointed in a safe direction!) and you end up shooting yourself in the foot. This article shows how to locate the stack at the BEGINNING of RAM and thus point it in the "safe" direction.
nRF5 to nRF Connect SDK migration via DFU over BLE
This writeup contains some notes on how I was able to migrate one of my clients projects based on the nRF5 SDK, to nRF Connect SDK (NCS) based firmware, via a DFU to devices in the field over BLE.
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
NULL pointer protection with ARM Cortex-M MPU
This post explains how you can set up the ARM Cortex-M MPU (Memory Protection Unit) to protect thy code from dragons, demons, core dumps, and numberless other foul creatures awaiting thee after thou dereference the NULL pointer.
Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image
This hands-on guide peels back the NuttX source tree and shows how to assemble a tailored firmware image. You will learn what each top-level directory does, how to enable apps with menuconfig and search tricks to resolve dependencies, and how to save a defconfig as a reusable board profile so you can rebuild the same image without repeating configuration steps.
Getting Started With Zephyr: Kconfig
In this blog post, we briefly look at Kconfig, one of the core pieces of the Zephyr infrastructure. Kconfig allows embedded software developers to turn specific subsystems on or off within Zephyr efficiently and control their behavior. We also learn how we can practically use Kconfig to control the features of our application using the two most common mechanisms.
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!
STM32 B-CAMS-OMV Walkthrough
Want to prototype embedded vision quickly? This walkthrough shows how the STM32 B-CAMS-OMV camera module pairs with the STM32H747I-DISCO discovery kit and the FP-AI-VISION1 function pack to get you running in minutes. The video covers the camera connection interface, key software functions to control and process data, and the ISP features that let image processing run inside the camera. The STM32 H7 project with B-CAMS-OMV drivers is available on GitHub.
STM32 VS Code Extension Under The Hood
ST's STM32 VS Code extension hides useful CMake projects and VS Code tasks behind a friendly UI, but understanding what it generates lets you bend it to your needs. This video peels back the layers to show the generated CMake files, how to modify them, how to add a VS Code-invokable flash task, and how to enable C++ support alongside C. The STM32 F0 example and flash task are available on GitHub.
C to C++: 3 Reasons to Migrate
Embedded C still powers most devices, but rising system complexity is revealing its limits. In this post Jacob Beningo kicks off a series on moving from C to C++, offering three practical reasons to start the migration now. He argues for an incremental approach that keeps low-level, hardware-dependent code in C while adopting C++ for higher-level, object-oriented application logic so teams can keep shipping during the transition.
From Baremetal to RTOS: A review of scheduling techniques
Jacob Beningo walks through five common embedded scheduling techniques, showing how each scales from a single super loop to a full RTOS. He highlights practical trade-offs for round-robin, interrupt-driven, queued, cooperative, and RTOS approaches so you can spot when timing becomes fragile and when added complexity is justified. This primer sets up the next post on when to adopt an RTOS.
nRF5 to nRF Connect SDK migration via DFU over BLE
This writeup contains some notes on how I was able to migrate one of my clients projects based on the nRF5 SDK, to nRF Connect SDK (NCS) based firmware, via a DFU to devices in the field over BLE.
Simulating Your Embedded Project on Your Computer (Part 2)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).
Cortex-M Exception Handling (Part 2)
Exception entry and return on Cortex-M look simple, but the hardware does a lot to preserve context, enforce privilege, and pick the right stack. This post walks through the processor actions after an exception is accepted: which registers get pushed, how CONTROL, MSP and PSP affect stack selection, how EXC_RETURN encodes the return path, and why VTOR and vector table alignment matter for handler lookup.
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
Introduction to Microcontrollers - Hello World
Mike Silva walks through the classic embedded hello world by blinking an LED on both an AVR and an STM32. The tutorial covers GPIO configuration, bit manipulation, simple software delay loops, and common pitfalls such as compiler optimizations that can remove empty delays unless you use volatile. Practical wiring tips and debugging advice with a scope make this an ideal first lab for embedded engineers.
Introduction to PIC Timers
The fourth in a series of five posts looks at 8-bit PIC hardware timers. After a review of basic timer functionality, the Timer0 module operation and configuration is reviewed and a basic application implemented using Timer0 to blink external LEDs at a frequency of 0.5Hz.
Introduction to Microcontrollers - 7-segment displays & Multiplexing
Seven-segment displays can eat dozens of GPIO pins and dozens of resistors, but multiplexing trades pins for time and cuts component count dramatically. Mike Silva shows a hands-on AVR C implementation with segment encoding, a 100 Hz display scan ISR, several integer-to-digit conversion techniques, and software workarounds for messy pin mappings. He also demonstrates a timer "leapfrog" to reuse one timer for two tasks and compares performance so you can choose the best approach for your MCU.
Breaking AES with an Oscilloscope
AES is a powerful encryption algorithm that protects some our most important secrets. But did you know that many devices are inadvertently leaking the value of their private key through their power pins?! Join me in this special preview of my upcoming workshop at the Embedded Systems Summit (14-16 October 2025 in San Jose, CA) as we explore the world of hardware security and discover just how easy it could be to break AES encryption with only an oscilloscope and some math.
Introduction to Microcontrollers - More On GPIO
Polarity matters: an output '1' does not always mean an LED lights, and inputs are just as picky. This post walks through LED driving basics, pull resistors for buttons, and practical bitwise techniques to read and write individual GPIO pins on AVR and STM32 boards. It also explains why polling rates and mechanical bounce make button handling trickier than it looks and what to watch for next.
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...Energia - program a TI MSP430 using Arduino sketches
Energia brings Arduino simplicity to TI's MSP430, turning a fiddly toolchain into a sketch-based workflow you already know. Lonnie Honeycutt walks through why the Launchpad is a great low-cost dev option, outlines supported MSP430 families and caveats like 3.3 volt I/O, and shows a Halloween LED jack-o-lantern sketch to prove how quickly you can get blinking LEDs.
OOKLONE: a cheap RF 433.92MHz OOK frame cloner
Fabien Le Mentec built a pocket device that listens to and clones 433.92MHz OOK frames, automating the tedious reverse engineering of cheap wireless outlets. The prototype uses a Moteino with an RFM69 to sample demodulated OOK data, stores pulse durations in SRAM, and replays frames; the code and hardware notes are available on GitHub along with limitations and next steps.
Write Better Code with Block Diagrams and Flowcharts
Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.
C to C++: 3 Reasons to Migrate
Embedded C still powers most devices, but rising system complexity is revealing its limits. In this post Jacob Beningo kicks off a series on moving from C to C++, offering three practical reasons to start the migration now. He argues for an incremental approach that keeps low-level, hardware-dependent code in C while adopting C++ for higher-level, object-oriented application logic so teams can keep shipping during the transition.
Introduction to Microcontrollers - Adding Some Real-World Hardware
Two blinking LEDs only teach you so much, so Mike designed a docking board that adds a 4x20 HD44780 LCD, a 4x4 button matrix, four LEDs, DIP switches and an ADC potentiometer for AVR and STM32 experiments. This post shows how to wire and drive the HD44780 in 4-bit mode, calibrate microsecond and millisecond software delays, use the busy flag to speed writes, and includes AVR example code to get the display running.
Introduction to Microcontrollers - More Timers and Displays
Mike Silva walks through using a single hardware timer to create the illusion of parallel tasks, combining a millisecond tick, deadline checks, and a cyclic executive to run time-driven and event-driven work. He shows safe deadline code that handles timer rollover and ISR races, and provides practical STM32 examples including SysTick-driven delays, atomic GPIO BSRR writes for LCD control, and a button-driven display demo.
Simulating Your Embedded Project on Your Computer (Part 1)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.
How to Arduino - a video toolbox
I've begun producing a new series of video tutorials for the hobbyist new to the Arduino or microcontrollers in general. My videos are very pragmatic - I prefer to answer the question "what is the quickest, simplest and most affordable way to accomplish this?". The videos are meant to be a quick source of "how to" knowledge for the hobbyist that is using an LCD display, ultrasonic sensor or accelerometer for the first time, for example. I hope you enjoy this series of...
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...



















