Content originally posted in LPCWare by wmues on Thu Oct 31 00:52:12 MST 2013
Markr,
if color is used only inside main(), there is no need to make color volatile.
But you have 2 while loops at the start of the loop.
- is TimeTick volatile?
- Is LPC_GPIO_PORT->W0[ISP_PIN] volatile?
If not, the compiler might assume that one of those variables is 0 and not changing value, so the rest of the loop is optimized away (unreachable code).
regards
Wolfgang