This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Volatile keyword being ignored



Hi,

I'm using CCS 4.1.3.00038 to write code for an MSP430.

In the attached file I'm trying to create a one second tick for use by my application, the thing is every call to sysHasOneSecondPassed() returns false even though I can see the code is running into the interrupt and setting it to true by using the debugger. I've declared the flag to be volatile but it appears the compiler is still not compiling the code as written.

Can anyone shed any light on this?

Regards,

Ben