EmbeddedRelated.com

NULL pointer protection with ARM Cortex-M MPU

Miro Samek July 16, 2023

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.


Call for Bloggers!

Stephane Boucher July 12, 2023

Are you passionate about embedded systems? Do you have valuable insights, tips, or stories to share with the embedded community? Do you want to reach a large and engaged audience of embedded enthusiasts and professionals? We are currently looking at adding a few more inspired writers to our team of bloggers.


Bellegram, a wireless DIY doorbell that sends you a Telegram message

Sergio R Caprile July 9, 2023

A wireless button that uses the M5 STAMP PICO and Mongoose to send a Telegram message when pressed. The code is written in C


Getting Started with (Apache) NuttX RTOS Part 2 - Looking Inside and Creating Your Customized Image

Alan C Assis July 5, 2023

In the previous article (https://www.embeddedrelated.com/showarticle/1524.p...) we saw how to run NuttX RTOS using the SIMulator. Today we will see how NuttX's directory tree is organized and how to use the menuconfig to enable some applications, including some tricks to search and solve dependencies.

NuttX Directories organization:

If you have previously compiled the Linux kernel or the U-Boot bootloader you will see that the NuttX source tree organization is very...


Moulding the Embedded Systems Engineers of Tomorrow: Adapting to a Constantly Transforming Technological Terrain

Lance Harvie June 26, 2023

Embedded systems engineers, previously focused on device architecture, are now steering the digital era, encompassing firmware, software, complex silicon, and cloud computing. To keep pace, mastery in new areas like cybersecurity, artificial intelligence (AI), machine learning (ML), and cloud technologies is critical. In today's highly connected world, security is foundational to design, necessitating knowledge in encryption, secure coding, and data protection laws. Additionally, expertise in AI and ML is essential for managing vast global data, requiring understanding of ethical implications and effective system design for data analysis. The advent of cloud technology mandates learning about cloud architectures and data security. In this fast-paced field, continuous learning and adapting these new skills is the key to staying relevant and spearheading future advancements.


Getting Started With Zephyr: Kconfig

Mohammed 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.


An Iterative Approach to USART HAL Design using ChatGPT

Jacob Beningo June 19, 202311 comments

Discover how to leverage ChatGPT and an iterative process to design and generate a USART Hardware Abstraction Layer (HAL) for embedded systems, enhancing code reusability and scalability. Learn the step-by-step journey, improvements made, and the potential for generating HALs for other peripherals.


Modern C++ in Embedded Development: (Don't Fear) The ++

Amar Mahmutbegovic June 13, 20232 comments

While C is still the language of choice for embedded development, the adoption of C++ has grown steadily. Yet, reservations about dynamic memory allocation and fears of unnecessary code bloat have kept many in the C camp. This discourse aims to explore the intricacies of employing C++ in embedded systems, negotiating the issues of dynamic memory allocation, and exploiting the benefits of C++ offerings like std::array and constexpr. Moreover, it ventures into the details of the zero-overhead principle and the nuanced distinctions between C and C++. The takeaway? Armed with the right knowledge and a careful approach, C++ can indeed serve as a powerful, safer, and more efficient tool for embedded development.


Getting Started with (Apache) NuttX RTOS - Part 1

Alan C Assis June 2, 20235 comments

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!


Working with Strings in Embedded C++

Niall Cooling June 1, 20233 comments

This article discusses the use of strings in embedded systems. It explains how the need for and use of strings in embedded systems has changed with the advent of cheaper, full graphic displays and the growth of the ‘Internet of Things’ (IoT). The article also covers character literals, C-Strings and string literals, and the difference in memory models between them. It also highlights the safety and security issues that arise from using strings in embedded systems. Finally, it explains how C++11 introduced a Raw string literal type that is useful for storing file paths or regular expressions.


Cortex-M Exception Handling (Part 1)

Ivan 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.


Important Programming Concepts (Even on Embedded Systems) Part IV: Singletons

Jason Sachs November 11, 20142 comments

Other articles in this series:

Today’s topic is the singleton. This article is unique (pun intended) in that unlike the others in this series, I tried to figure out a word to use that would be a positive concept to encourage, as an alternative to singletons, but


Supply Chain Games: What Have We Learned From the Great Semiconductor Shortage of 2021? (Part 2)

Jason Sachs June 18, 20223 comments

Welcome back! Today we’re going to zoom around again in some odd directions, and give a roundabout introduction to the semiconductor industry, touching on some of the following questions:

  • How do semiconductors get designed and manufactured?
  • What is the business of semiconductor manufacturing like?
  • What are the different types of semiconductors, and how does that affect the business model of these manufacturers?
  • How has the semiconductor industry evolved over...

Lost Secrets of the H-Bridge, Part III: Practical Issues of Inductor and Capacitor Ripple Current

Jason Sachs August 24, 20133 comments

We've been analyzing the ripple current in an H-bridge, both in an inductive load and the DC link capacitor. Here's a really quick recap; if you want to get into more details, go back and read part I and part II until you've got equations coming out of your ears. I promise there will be a lot less grungy math in this post. So let's get most of it out of the way:

Switches QAH and QAL are being turned on and off with pulse-width modulation (PWM), to produce an average voltage DaVdc on...


Introduction to Microcontrollers - More On Interrupts

Mike Silva September 25, 2013

A Little More Detail About The Interrupt Mechanism

It'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...


Lost Secrets of the H-Bridge, Part I: Ripple Current in Inductive Loads

Jason Sachs July 8, 2013

So you think you know about H-bridges? They're something I mentioned in my last post about signal processing with Python.

Here we have a typical H-bridge with an inductive load. (Mmmmm ahhh! It's good to draw by hand every once in a while!) There are four power switches: QAH and QAL connecting node A to the DC link, and QBH and QBL connecting node B to the DC link. The load is connected between nodes A and B, and here is represented by an inductive load in series with something else. We...


Linear Feedback Shift Registers for the Uninitiated, Part I: Ex-Pralite Monks and Finite Fields

Jason Sachs July 3, 20176 comments

Later there will be, I hope, some people who will find it to their advantage to decipher all this mess.

— Évariste Galois, May 29, 1832

I was going to call this short series of articles “LFSRs for Dummies”, but thought better of it. What is a linear feedback shift register? If you want the short answer, the Wikipedia article is a decent introduction. But these articles are aimed at those of you who want a little bit deeper mathematical understanding,...


Delayed printf for real-time logging

Yossi Kreinin October 25, 20133 comments

You often debug by adding a few printfs and looking at the logs. In some real-time/low-level contexts though, you don't have time for text formatting.

You don't want prints to affect timing too much, because then timing-related bugs you're chasing might disappear. And you certainly don't want the system to stop functioning altogether because prints cause it to miss real-time deadlines.

A common alternative to prints is more "raw" logging - an event buffer, where event is a union keeping...


Android for Embedded Devices - 5 Reasons why Android is used in Embedded Devices

Maharajan Veerabahu November 6, 20173 comments

The embedded purists are going to hate me for this. How can you even think of using Android on an embedded system ? It’s after all a mobile phone operating system/software. 

Sigh !! Yes I did not like Android to begin with, as well - for use on an Embedded System. But sometimes I think the market and needs decide what has to be used and what should not be. This is one such thing. Over the past few years, I have learned to love Android as an embedded operating system....


Lazy Properties in Python Using Descriptors

Jason Sachs November 7, 2017

This is a bit of a side tangent from my normal at-least-vaguely-embedded-related articles, but I wanted to share a moment of enlightenment I had recently about descriptors in Python. The easiest way to explain a descriptor is a way to outsource attribute lookup and modification.

Python has a bunch of “magic” methods that are hooks into various object-oriented mechanisms that let you do all sorts of ridiculously clever things. Whether or not they’re a good idea is another...