Automatic Hardware Behavior Triggered by Interrupts in ARMv8-A AArch64

Automatic Hardware Behavior Triggered by Interrupts in ARMv8-A AArch64

1. Automatic Hardware Behavior Triggered by Interrupts in ARMv8-A AArch64 1. Save PSTATE to SPSR_ELx; 2. Save return address to ELR_ELx; 3. Set PSTATE.{D,A,I,F} to 14; if it is a synchronous exception or SError, update the ESR_ELx exception characteristics register; 5. Jump to the exception vector table; 6. Select the target exception level's sp_elx

Getting Started with PIC16 Microcontroller from Scratch

Getting Started with PIC16 Microcontroller from Scratch

Get the demo source code file at the end of the article ↓Software Platform: MCC v5.5.2, MPLAB X IDE v6.25Hardware Platform:PIC16F685Basic settings for configuring the microcontroller startup – Configuration WordSet system clock source and other parameters through the microcontroller configuration wordSet relevant configuration words in the configuration word interface and generate codeSet system clockFOSCto internal … Read more

Essential Topics to Prepare for Embedded Software Interviews

Essential Topics to Prepare for Embedded Software Interviews

Pointers and Arrays: Stop Saying “Pointers are Just Addresses” This is the “appetizer” for embedded interviews, but 80% of candidates fail to provide a deep answer. For example, when asked about the “difference between pointers and arrays,” simply stating “the array name is a constant pointer” is insufficient; it must be explained in the context … Read more

Embedded Application Technology of ARM Cortex-M4

Embedded Application Technology of ARM Cortex-M4

Table of Contents Chapter 1 Overview of Embedded Systems Video Explanation: 14 minutes, 1 episode 1.1 Definition of Embedded Systems 1.1.1 Embedded Microprocessors 1.1.2 Input/Output Interfaces 1.2 Components of Embedded Systems 1.3 Classification of Embedded Systems 1.3.1 Classification by Processor 1.3.2 Classification by Operating System 1.3.3 Classification by Integration Level and Application Layer 1.4 Characteristics … Read more

Introduction to Interrupt Processes

Introduction to Interrupt Processes

15.2 Introduction to Interrupt Processes When an interrupt occurs, it first passes through the IRQ register. When the IRQ register detects an interrupt, it sends an interrupt signal to the Nested Vectored Interrupt Controller (NVIC) of the central processor. When the NVIC detects the interrupt request, it suspends the corresponding interrupt service routine (ISR). After … Read more

Differences Between PRIMASK and BASEPRI in ARM

Differences Between PRIMASK and BASEPRI in ARM

Recently, I discovered a phenomenon: in the AUTOSAR OS, if an interrupt occurs after task scheduling, the BASEPRI is used to control the enabling and disabling of interrupts. If it occurs before task scheduling, PRIMASK is used for control. This article introduces the differences between these two. 1. Differences <span>PRIMASK</span>: All or nothing switch. It … Read more

Five Important Considerations for Microcontroller Embedded Programming

Five Important Considerations for Microcontroller Embedded Programming

In the process of microcontroller programming, if a designer can master multiple programming languages simultaneously, then that designer is undoubtedly a very talented individual. However, mastering assembly, C, and C++ at the same time is quite challenging, and many beginners struggle significantly while learning even one of these languages. This article specifically compiles insights from … Read more

External Pin Interrupts

External Pin Interrupts

14.5.1 ELC Block Diagram Analysis Click to view the full image Events can be linked to the following module functions: Table 2: Module Functions Chapter 15 ICU – External Interrupts References for this Chapter “RA6M5 Group User’s Manual: Hardware” Main Reference Chapter: 13. Interrupt Controller Unit (ICU) 15.1 External Pin Interrupts In the previous chapter, … Read more

C Language Issues in Embedded Development

C Language Issues in Embedded Development

Declare a constant using the preprocessor directive #define to indicate how many seconds are in a year (ignoring leap years): #define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL Write a standard macro MIN that takes two parameters and returns the smaller one: #define MIN(A,B) ((A) <= (B) ? (A):(B)) What is the purpose of … Read more

Understanding MCU Input Functions

Understanding MCU Input Functions

The “Understanding at a Glance” series explains common terms and concepts of 8-bit MCUs in the most straightforward way. Unlike traditional explanations of the 8051, this series will combine products and practices from mainstream microcontroller manufacturers in the current market (such as Zhongx, Shengx, Xinx, Yingx, Jiux, etc.) to analyze core knowledge in a simple … Read more