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

C Language Special: extern, volatile, and inline

C Language Special: extern, volatile, and inline

In the C language, <span>extern</span>, <span>volatile</span>, and <span>inline</span> are three widely used keywords, each related to cross-file variable declarations, compiler optimization control, and function inlining. Mastering their usage can effectively enhance code structure, stability, and performance. 1. extern (External Variable Declaration) <span>extern</span> is used to declare global variables or functions defined in other files, enabling … 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

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

How to Prevent Variable Changes Due to Interrupts in Microcontroller Programming

How to Prevent Variable Changes Due to Interrupts in Microcontroller Programming

Introduction In embedded development, have you ever encountered a scenario where the value of a global variable suddenly changes? The interrupt service routine has modified it, yet the main program continues to read the old value. Even more frustrating, these issues are often difficult to reproduce, making debugging feel like “catching ghosts.” The root cause … Read more

Comparative Analysis of Two Common Flash Memory Types: NAND Flash and NOR Flash

Comparative Analysis of Two Common Flash Memory Types: NAND Flash and NOR Flash

NAND Flash and NOR Flash are two common types of flash memory.NOR Flash was first developed by Intel in 1988, changing the landscape that was previously dominated by EPROM and EEPROM.NAND Flash was released by Toshiba in 1989, emphasizing lower cost per bit, higher performance, and the ability to be easily upgraded through interfaces like … Read more

Semiconductor Devices: Floating Gate Transistors

Semiconductor Devices: Floating Gate Transistors

Source: Semiconductors and Physics Original Author: Yi Zheke Floating gate transistors are mainly used in non-volatile memory, such as the basic unit in NAND flash. This article introduces the structure and principle of floating gate transistors. The above image shows the basic composition of a floating gate transistor, which adds a floating gate layer between … Read more