|
Re: Second clock/timer causes red light of death
I think volatile is correct in this context. It tells the compiler that it needs to read the memory every time it accesses a particular variable (not use a register cached value), since the variable may change outside of the compiler's ability to predict or controll. In this instance, the variable might be updated by your interrupt service routine.
|