I have a program that samples for 50 ms on a 1 sec period (approximately). Uses LFO for timing and ADC10 for sampling.
50 ms -> sample continuously
950 ms -> stop sampling and enter LPM3 with timer running off LFO
When entering LPM3 at the end of each 50 ms sampling cycle, I run the following code:
// RFD sleep function void SleepRFD(void) { ADC10CTL0 &= ~ENC; // Stop conversion ADC10CTL0 &= ~REFON; // Turn off reference RF_DET_OFF // Turn RF supply off ALL_LED_OFF // Turn LEDs off __bis_SR_register(LPM3_bits); // Enter LPM3 }
If I turn the reference off (ADC10CTL0 &= ~REFON;), I get a good minimum Iq of about 0.012 mA, which is the parasitic draw of my circuit. However, I get very large amounts of delay entering LPM3, so the average current consumption of the overall code (sampling and sleeping) is 6.6 mA. See attached images for Energy Trace plot of this.
If I leave the reference ON (//ADC10CTL0 &= ~REFON;), I get a worse minimum Iq of about 0.194 mA, which is dominated by the reference current draw. However, the code enters LPM3 quickly, so the average current consumption of the overall code (sampling and sleeping) is 2.3 mA. See attached images for Energy Trace plot of this.
Looking at the energy trace plot, it looks like switching the reference off is causing a delay in the MSP430 entering LPM3. What should I be doing differently to power off so that I can shut off the reference and enter LPM3 quickly? Also, why does Energy Trace show a LONGER estimated battery life for the HIGHER mean current draw of the first trace?