This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Low power MSP430F2618 not able to reduce current below 900uA

Other Parts Discussed in Thread: MSP430F2618

Hi

I was using the Evaluation module for MSP430F2618

My application needs CPU to be active and must have low power. For this purpose i tried out a small program to run uC at a low clock rate

I modified one example code of MSP430F2618

#include  <msp430x26x.h>

void main(void)
{
  WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
  BCSCTL3 |= LFXT1S1 ;
  BCSCTL2 |= (SELM1+SELM0+SELS);
 
  ADC12CTL0 = SHT0_2 + ADC12ON;             // Set sampling time, turn on ADC12
  ADC12CTL1 = SHP+ ADC12SSEL1;                          // Use sampling timer
  ADC12IE = 0x01;                           // Enable interrupt
  ADC12CTL0 |= ENC;                         // Conversion enabled
  P6DIR &= 0x01;                            // P6.0, i/p
  P6SEL |= 0x01;                            // P6.0-ADC option select
  //P1DIR |= 0x01;                            // P1.0 output-LED

  for (;;)
  {
    ADC12CTL0 |= ADC12SC;                   // Start convn, software controlled
    _BIS_SR(CPUOFF + GIE);                  // LPM0, ADC12_ISR will force exit
  }
}

// ADC12 interrupt service routine
#pragma vector=ADC12_VECTOR
__interrupt void ADC12_ISR (void)
{
    //if (ADC12MEM0 < 0x7FF)
      //P1OUT &= ~0x01;                       // Clear P1.0 LED off
    //else
      //P1OUT |= 0x01;                        // Set P1.0 LED on
    _BIC_SR_IRQ(CPUOFF);                    // Clear CPUOFF bit from 0(SR)
}

I am always getting a current consumption of 900uA @ 3V

This is way above the CPU limits. Also when I put break point in the program the device current reduces to 200uA

Please let me know how to make CPU work in lower clock rate

  • Rakesh Muralidharan said:
    I am always getting a current consumption of 900uA @ 3V
    This is way above the CPU limits. Also when I put break point in the program the device current reduces to 200uA


    No wonder. In your ISR, you do not clear the IFG bit that has caused the interrupt or read the ADC12MEM register that caused the interrupt (which would clear the bit too). So your ISR exits, but then enters the ISR again right away. It never sleeps. It is running on 100% load, trying to handle an interrupt over and over again that simply isn't ever handled by the ISR.

    See the ADC12IFG register description in the users guide.
    (the ADC10 is different: it only has one IFG bit as it has only one result register, and it is auto-cleared when the ISR is entered)

    When you place a breakpoiont, the CPu stops (of course, as this is the intention of a breakpoint) and current drops.

**Attention** This is a public forum