Other Parts Discussed in Thread: ENERGYTRACE, MSP430G2210, MSP-FET, CCSTUDIO
During firmware development I'm constantly using checking EnergyTrace. Today I saw something peculiar. Have a look at these plots, which come from the same run. Notice that the power plot doesn't agree with the energy plot. The energy plot shows 6 brief periods of increased energy consumption. The power plot should show 6 corresponding spikes. I was able to reproduce this discrepancy multiple times.
The code, with which these plots were produced.
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop WDT
BCSCTL1 |= DIVA_1; // ACLK/2
BCSCTL3 |= LFXT1S_2; // source ACLK from VLO
P1DIR |= 0x04; // P1.2 output
CCTL0 = CCIE; // CCR0 interrupt enabled
CCR0 = 1000-1;
TACTL = TASSEL_1 | MC_1; // ACLK, upmode
volatile int i;
while (1) {
for (i = 0; i < 100; ++i); // burn some power to show life signs
__bis_SR_register(LPM3_bits + GIE); // Enter LPM3 w/ interrupt
// P1OUT ^= 0x04;
}
}
// Timer A0 interrupt service routine
#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer_A (void) {
__bic_SR_register_on_exit(LPM3_bits);
}
My development environment: CCStudio 6.1.0.00104, MSP-FET via Spy-Bi-Wire, MSP430G2210. I can post more details if needed, of course.
