Understanding the C Language Keyword ‘volatile’

Understanding the C Language Keyword 'volatile'

In the C language, <span>volatile</span> is a type specifier that informs the compiler that the variable it modifies may be changed by factors outside the program (such as hardware, interrupt service routines, etc.). Therefore, the compiler should not optimize this variable, and it must read its value from memory each time it is used, rather … Read more

The Use of the ‘volatile’ Keyword in Embedded C Language

The Use of the 'volatile' Keyword in Embedded C Language

In embedded system development, the ‘volatile’ keyword is a very important modifier that tells the compiler that the value of a variable may change outside the control of the program. Correctly using the volatile keyword can prevent errors caused by compiler optimizations, ensuring the correctness and reliability of the code. This article will detail the … Read more

A Quick Guide to Page Faults in Modern SoC Architectures

A Quick Guide to Page Faults in Modern SoC Architectures

This series is a quick reference booklet on the core areas of knowledge in modern SoC architecture. Chapter 5Page Faults(Page Faults) Section 1Types of Page Faults Section 2Interrupt Service Routines Section 3Interrupt and Exception Handlers Section 4What is the Role of Page Fault Handlers? Chapter 5Page Faults(Page Faults) When the MMU detects an attempt to … Read more

Detailed Explanation of STM32 Startup Files

Detailed Explanation of STM32 Startup Files

“ This article provides a detailed explanation of the STM32F4xx startup file startup_stm32f407xx.s, covering the stages from chip power-up to entering main(), analyzing key codes and their functions such as stack and heap definitions, vector tables, reset programs, interrupt service routines, and user stack initialization.” 01 — Introduction STM32 microcontroller startup files are used to … Read more

Learning the CAN Bus Communication Protocol: (6) How to Avoid Long Execution Times in Interrupt Service Routines During CAN Interrupt Reception

Learning the CAN Bus Communication Protocol: (6) How to Avoid Long Execution Times in Interrupt Service Routines During CAN Interrupt Reception

Click the blue text Follow us 1. Problem Description Performing a large number of complex operations during CAN interrupt data reception can indeed lead to long execution times for the Interrupt Service Routine (ISR). This may cause issues such as missing other interrupt requests and affecting the real-time performance of the system. Since the ISR … Read more

How to Learn C Language Programming for Embedded Systems?

How to Learn C Language Programming for Embedded Systems?

Everyone is quite familiar with the C language, but do you have this question: why, after learning C for so long, are you still stuck at the beginner level? I have seen many summaries of others’ programming experiences and found that most of them talk about their programming skills. Everyone knows that good programming skills … Read more

Embedded Development in C: When to Use the Volatile Keyword for Variables?

Embedded Development in C: When to Use the Volatile Keyword for Variables?

What is the volatile keyword? In embedded programming with C, the volatile keyword is very important. Its English meaning is “changeable”. Its main function is to inform the compiler that the value of the variable it modifies may change in ways that the compiler cannot predict during program execution. Therefore, the compiler cannot perform regular … Read more

Key Aspects to Consider in Embedded System Programming Software Architecture

Key Aspects to Consider in Embedded System Programming Software Architecture

Follow and star our official account to access exciting content ID: Technology Makes Dreams Greater Compiled by: Li Xiaoyao Module Division The “division” in module division refers to planning, meaning how to reasonably divide a large software into a series of functionally independent parts to meet the system’s requirements. C language, as a structured programming … Read more