Interrupts and Exceptions in Cortex-M

Interrupts and Exceptions in Cortex-M

Definition First, let’s look at the definitions of both in the authoritative guide for Cortex-M. 1 Exception Definition According to the authoritative guide for Cortex-M, an exception refers to an event that can alter the normal program flow. When an exception occurs, the processor pauses the currently executing task and executes a dedicated program to … Read more

Windows PCI Device Driver Development Guide: Installing Drivers on QEMU Simulated PCIe Devices

Windows PCI Device Driver Development Guide: Installing Drivers on QEMU Simulated PCIe Devices

To add more functionality to the PCI device driver we wrote, we simulated a test PCIe device on QEMU, allowing us to implement features we wanted, such as DMA and interrupts. For the specific implementation of this PCIe test device, please refer to How to Implement a PCIe Device in QEMU. The Vendor ID and … Read more

In-Depth Analysis of UART Communication: From Low-Level Registers to Interrupt-Driven Processes

In-Depth Analysis of UART Communication: From Low-Level Registers to Interrupt-Driven Processes

Today, while working on an intelligent voice control module, I wanted to reinforce my knowledge of serial communication. Upon reviewing my previous notes, I found them lacking in detail, so I decided to write a new article explaining the principles of serial communication, covering both hardware and software implementations clearly. This will thoroughly clarify the … Read more

UART and DMA Data Transmission

UART and DMA Data Transmission

Concept of DMA DMA (Direct Memory Access) allows data transfer without direct control from the CPU. It creates a direct pathway for data transfer between RAM and I/O devices, significantly improving CPU efficiency. There are several methods for UART data reception: the interrupt mode of UART isthe most commonly used data transmission method in microcontrollers, … Read more

The Cornerstone of Embedded Real-Time Systems: Practical Design of ARM+Linux Interrupts

The Cornerstone of Embedded Real-Time Systems: Practical Design of ARM+Linux Interrupts

In today’s digital age, efficient computing is the core driving force behind technological development. The ARM and Linux interrupt systems serve as the key to unlocking this door to efficient computing. The ARM architecture, with its low power consumption and high performance characteristics, is widely used in various devices from smartphones to industrial control systems, … Read more

Can Microcontrollers Truly Execute Multiple Tasks Simultaneously?

Can Microcontrollers Truly Execute Multiple Tasks Simultaneously?

Many students ask me: Why does my LED light blink while the serial port data reception gets stuck? I want to read data from two sensors simultaneously, why is it that one of them always reads incorrectly? Why can’t my program control the motor while sending data? The most classic question is: why can’t I … Read more

The Volatile Keyword You Might Overlook in MCUs

The Volatile Keyword You Might Overlook in MCUs

Click 👆👆👆 the blue text Follow “Passion Embedded” In embedded development, especially in the development of microcontrollers like STM32, the <span>volatile</span> keyword is a very important concept. 1. Concept of the volatile Keyword <span>volatile</span> is a type modifier in C/C++ that tells the compiler: The variable may be modified unexpectedly (e.g., by hardware, interrupts, or … Read more

Interrupt Issues Based on NXP Core imx6ulx

Interrupt Issues Based on NXP Core imx6ulx

Requirement Description For scenarios that require extremely high real-time response (such as power failure detection), interrupts must be used. However, for the imx6ulx, which is a Linux platform, there are no convenient interrupt operations like those in RTOS. To achieve the same smooth operation, both the kernel driver and the application layer program need to … Read more

The Volatile Keyword You Might Overlook in MCUs

The Volatile Keyword You Might Overlook in MCUs

Click 👆👆👆 the blue text Follow “Passion Embedded” In embedded development, especially in the development of microcontrollers like STM32, the <span>volatile</span> keyword is a very important concept. 1. Concept of the volatile Keyword <span>volatile</span> is a type modifier in C/C++ that tells the compiler: The variable may be modified unexpectedly (e.g., by hardware, interrupts, or … Read more

Embedded Development Software Architecture in C: Interrupt Service Routines

Embedded Development Software Architecture in C: Interrupt Service Routines

1. Interrupt Mechanism of Microcontrollers The interrupt mechanism refers to the ability of a microcontroller to quickly handle external events (interrupt requests) while executing the main program. When an external event A occurs, the microcontroller pauses the current main program (interrupt response), saves the current state data, and then calls the handler for event A … Read more