Closed marioortizmanero closed 4 years ago
volatile
is actually needed. Even if it's often misused, in this case it's a good idea to do so. That way, it's ensured that the variable will always be read from memory, rather than from a register, and there won't be issues with the compiler trying to optimize something it shouldn't.
Volatile is a very mis-used keyword, it's probably not intended for the global status variable. Some discussion here https://e2e.ti.com/support/tools/ccs/f/81/t/3415?Multi-threading-and-global-variables-volatile-keyword-required-