Hello,
I am on Windows 7 professional SP1 64 bit.
The target device is an MSP430G2433 on a custom board.
I am using CCS ver 5.4.0.00091
I have a disconnect between the expressions view and memory view. The code (based on the disassembly) is doing what I expect.
Here are relevant (I hope) code snippets.
// These are for the ADC readings.
#pragma location=0x200;
volatile unsigned int Result_sns2;
#pragma location=0x202;
volatile unsigned int Result_sns1;
void Read_Analog_Channel(void)
{
Watchdog_Reset();
ADC10CTL1 = INCH_3 + SHS_0 + ADC10DIV_0 + ADC10SSEL_0 + CONSEQ_1; // Settings for the channels to be read - A3/A2, single sequence, ADC10SC, Straight Binary,
// Non-Inverted, Clock Divide by 1, ADC10OSC
ADC10CTL0 = SREF_0 + ADC10SHT_3 + MSC + ADC10ON; //VR+ = AVCC and VR- = AVSS, 64 ADC10CLKs,Multiple SampleConversion, ADC10 On/Enable
ADC10DTC1 = 0x02; // 2 conversions
ADC10AE0 |= BIT2 + BIT3; // Enable analog inputs A1 and A2
ADC10SA = 0x0200; // Data buffer start
ADC10CTL0 |= ADC10SC + ENC; //ADC10 Start Conversion, Enable Conversion
while(ADC10CTL1 & ADC10BUSY); //wait for conversion to complete
ADC10CTL0 = 0x0000;
ADC10AE0=0;
}
This is what I have on initialization when the debugger first connects and runs cinit:
As you can see, there is a slight difference in the values. When I run the code, the memory shows the values I expect, but the expressions never change value.
For some reason the address in the expressions view is twice what address in the memory view. This is not a coincident. I changed the location in RAM for the variables and the expressions address is double the new address.
I have run a search, the variable is not used anywhere else. I have tried modifiers of static, volatile and without ( just unsigned int).
Any insight would be helpful.
Regards,
Mike Warren