Code tested on CC1110F32 mini 868 with CCdebugger
Put a breakpoint on line "a++" run one time, and run again...
A this point the code will stopped at address 0xFFFF with KEIL or at 0x0000 with IAR...
Make one step assembler...Ok, check now the variable "a" the value will be 0xAA.
So, the code stop at the right point of code, but PC become 0xFFFF (xram).
Which bug is this ?
void main( void )
{
unsigned char a;
SLEEP &= ~0x04; // power down oscillators
while( !( SLEEP & 0x40 ) ); // wait for high speed crystal to become stable
CLKCON = 0x00; // switch from RC oscillator to high speed crystal oscillator
WDCTL = 0x03; // set 1.92 ms for reset
WDCTL |= 0x08; // start watchdog
a = 0xAA;
a ++;
while ( 1 ) a *= 2; // a *= 2 only to avoid compiler remove it and wait reset
}