I'm using CCS 4.2.1 with the MSP430G2331 chip and the launchpad as the FET. I'm trying to debug my program and I keep getting erroneous values in the watch window. Right now I'm trying to watch BCSCTL1, 2 and 3 to make sure the chip is getting configured correctly. When I look at the watch window for those values it doesn't match what I set.
Here's some code:
#include "msp430x20x2.h"
BCSCTL1 = CALBC1_1MHZ + DIVA_3 +XT2OFF; // Set range
DCOCTL = CALDCO_1MHZ;
BCSCTL2 = SELM_0 + DIVM_0 + DIVS_3; //
BCSCTL3 = LFXT1S_2; //Setting LF clock to VLO
After stopping execution two lines after these (those two lines do not touch those registers). The watch shows me this:
BCSCTL1 = 0000000001010111
BCSCTL2 =0000000001011000
BCSCTL3 = 0000000001010011
This is one specific example. I've had the same problem of incorrect watch values at other places, but have the program executes as desired. Does anyone know what is going on?