SPRUJG0B December 2024 – November 2025 F29H850TU , F29H859TU-Q1
The 'volatile' keyword on a variable indicates to the compiler that it might be modified by something external to the obvious flow of the program such as an ISR. This makes sure the compiler preserves the number of reads and writes to the global variable exactly as written in C/C++ code, without eliminating redundant reads or writes or re-ordering accesses. The volatile keyword must be used when accessing memory locations that represent memory mapped peripherals.