EmbeddedRelated.com
The 2026 Embedded Online Conference

Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities

Miro SamekMiro Samek February 26, 2016

ARM Cortex-M interrupt priorities are famously confusing because numeric priority values are inverted relative to urgency and several different conventions coexist. This post cuts through the mess by explaining NVIC register bit placement, the CMSIS NVIC_SetPriority convention, preempt versus subpriority grouping, and when to use PRIMASK or BASEPRI. Read on for practical rules to avoid subtle priority bugs in real-time firmware.


Cortex-M Exception Handling (Part 2)

Ivan Cibrario BertolottiIvan Cibrario Bertolotti February 1, 20169 comments

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.


Metal detection: beat frequency oscillator

Fabien Le MentecFabien Le Mentec January 30, 20161 comment
Plan Introduction Theory Electronics Software Tests ReferencesNext part: building the detector 1. Introduction

This 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

Govind MukundanGovind Mukundan December 27, 201524 comments

Running out of Flash or RAM is a familiar pain for firmware engineers, and the linker map only tells part of the story. This post shows how to combine the linker MAP with ELF symbol tables and DWARF debug info to recover static symbols, sizes, and source files that the map omits. It also describes a C# WinForms viewer that automates the parsing with binutils and helps you spot module and symbol-level memory waste.


Mounting plate for Arduino

Ed NutterEd Nutter November 30, 2015

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.


Cortex-M Exception Handling (Part 1)

Ivan Cibrario BertolottiIvan Cibrario Bertolotti November 28, 20152 comments

This article describes how Cortex-M processors handle interrupts and, more generally, exceptions, a concept that plays a central role in the design and implementation of most embedded systems.


Trust, but Verify: Examining the Output of an Embedded Compiler

Jason SachsJason Sachs September 27, 2015

Jason Sachs argues embedded engineers should read their compiler's assembly even if they rarely write assembly. He walks through Microchip XC16 output for dsPIC33 devices, showing how simple C variants and optimization flags produce very different code. The article demonstrates practical verification techniques and a tiny Python helper, pyxc16, to quickly inspect assembly for timing-sensitive firmware without rewriting everything in assembly.


Improving the Reload2 active load

Fabien Le MentecFabien Le Mentec April 23, 2015
Introduction

With another colleague at work, we are currently developing an electronic board that will eventually be powered over Ethernet. To gain more experience with this technology, we prototyped a standalone power supply stage.

We want to test this stage with different load profiles. While we already have professional grade active loads at work, I had previously read about the Reload2 product from Arachnidlabs, a low cost active load sold on Hackaday:


Slew Rate Limiters: Nonlinear and Proud of It!

Jason SachsJason Sachs October 6, 2014

Slew-rate limits are a small nonlinear detail that often decides whether a controller behaves nicely or wrecks hardware. Jason Sachs walks through why slew limits appear in electronics and actuators, then shows two practical digital ways to impose limits: constraining input increments and constraining input around the output. He compares performance on underdamped second-order systems, gives closed-form intuition for overshoot, and demonstrates simulations with scipy and ODE solvers.


Introduction to Microcontrollers - 7-segment displays & Multiplexing

Mike SilvaMike Silva August 14, 20141 comment

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.


7 Essential Steps for Reducing Power Consumption in Embedded Devices

Jacob BeningoJacob Beningo June 26, 20241 comment

Reducing the amount of power your embedded device is consuming is not trivial. With so many devices moving to battery operations today, maximizing battery life can be the difference between a happy, raving customer and an unhappy one that ruins your company's reputation. This post explores seven steps for optimizing your embedded systems' power consumption. You'll gain insights into the steps and techniques necessary along with receiving a few resources to help you on your journey.


Trust, but Verify: Examining the Output of an Embedded Compiler

Jason SachsJason Sachs September 27, 2015

Jason Sachs argues embedded engineers should read their compiler's assembly even if they rarely write assembly. He walks through Microchip XC16 output for dsPIC33 devices, showing how simple C variants and optimization flags produce very different code. The article demonstrates practical verification techniques and a tiny Python helper, pyxc16, to quickly inspect assembly for timing-sensitive firmware without rewriting everything in assembly.


Are We Shooting Ourselves in the Foot with Stack Overflow?

Miro SamekMiro Samek September 8, 20234 comments

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.


Arduino robotics #3 - wiring, coding and a test run

Lonnie HoneycuttLonnie Honeycutt October 17, 2013

Lonnie Honeycutt walks through wiring, coding, and the first test run of Clusterbot, a budget Arduino robot build costing about $50. The post provides a clear pin-mapping to the TB6612FNG motor driver, ready-to-upload Arduino movement functions, and practical tips like tinning thin battery wires. You also get PWM calibration values and the measured RPM timing the author used to make reliable turns.


Getting Started With Zephyr: Saving Data To Files

Mohammed BillooMohammed Billoo October 31, 20231 comment

In this blog post, I show how to implement a Zephyr application to mount a microSD card, create a new file on the microSD card, and write data to it. The lessons learned from such an application can be helpful for devices out in the field that need to write data to off-board memory periodically, especially in cases where Internet access may be sporadic.


Getting Started With Zephyr: Kconfig

Mohammed BillooMohammed Billoo June 22, 2023

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.


Understanding Microchip 8-bit PIC Configuration

Luther StantonLuther Stanton March 26, 20244 comments

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.


Choosing a Microcontroller for Your Vehicle

Ed NutterEd Nutter June 7, 20161 comment

Picking the right microcontroller can make or break an autonomous vehicle project, and this post gives a practical checklist to help. It walks through voltage and power needs, memory and IO planning, cost and availability tradeoffs, and when to step up from an 8-bit MCU to a 32-bit controller or single-board computer. Real-world board examples illustrate the choices.


Cutting Through the Confusion with ARM Cortex-M Interrupt Priorities

Miro SamekMiro Samek February 26, 2016

ARM Cortex-M interrupt priorities are famously confusing because numeric priority values are inverted relative to urgency and several different conventions coexist. This post cuts through the mess by explaining NVIC register bit placement, the CMSIS NVIC_SetPriority convention, preempt versus subpriority grouping, and when to use PRIMASK or BASEPRI. Read on for practical rules to avoid subtle priority bugs in real-time firmware.


Working with Microchip PIC 8-bit GPIO

Luther StantonLuther Stanton April 24, 20241 comment

The third in a series of five posts looks at GPIO with PIC 8-bit microcontrollers. After a detailed review of the registers for configuring and managing GPIO on the PIC18F47Q10 processor, a basic application is stood up programming those registers to blink external LEDs at 0.5Hz.


The 2026 Embedded Online Conference