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.

How to get low current consumption by using LMP3

Other Parts Discussed in Thread: MSP430G2332

Hello,

 I am trying to achieve low current  in LPM3 on a MSP430G2332. Power supply is from battery CR2032. I am running a small SW below included. I measure current from pin 1 of the micro controller and current is > 50uA when LMP3 is activated. Actication time is about 1,5 second and current could be measured. According to specification it should be below 1uA, Why? Could you help me?

 void LowPowerWait(unsigned int threeMilliseconds)

{

while(threeMilliseconds > 0)

{

        CCR0 += 39;

        threeMilliseconds--;

}

BCSCTL2 = SELM_0;

_BIS_SR(LPM3_bits + GIE);

}

 

void main(void)

{

WDTCTL = WDTPW + WDTHOLD;

P1DIR |= BIT0+BIT1+BIT4+BIT5+BIT6+BIT7;

P1OUT &= ~(BIT0+BIT1+BIT4+BIT6+BIT7);

P1OUT |= BIT5;

P2DIR &= ~BIT6;

P2DIR |= BIT7;

P2OUT |= BIT7;

ADC10AE0 = BIT2;

unsigned int i=0;

int temp=0;

     InitUSI();

     DCOCTL = CALDCO_1MHZ;

     BCSCTL1 = CALBC1_1MHZ;

TACCTL0 |= CCIE;

TACCTL0 &= ~CCIFG;

TACTL = TASSEL_1 + MC_2;

              BCSCTL3 |= LFXT1S_2;

              __bis_SR_register(SCG1 + SCG0);// Stop DCO

              InterruptType = 3;

              CCR0delta = 78;

CCR0 = TAR + CCR0delta;

__enable_interrupt();

while(1)

{

        if(GetAdcValues() > 0) //Alway 0

        {

       

               …     

 

        }

        else

        {

               LowPowerWait(498);

        }

}

}

 

#pragma vector=TIMER0_A0_VECTOR

__interrupt void Timer_A0(void)

{

TACTL &= ~TAIFG

__enable_interrupt();

if (InterruptType == 0)

{

        LPM0_EXIT;

}

else

{

        LPM3_EXIT;

}

CCR0 += CCR0delta;

}

  • Hello,

    The 50ma measurement is more in line with LPM0 mode.  I believe that the device is actually in LPM0 mode.

    There are two LPM3 mode examples in CCS's  Resource Explorer for the G2332.  Maybe those examples can adapted to work with your device and to measure the current in LPM3.

    Regards,

    Arthi Bhat

     

  • Hello,

    Please, could you send to me a link to examples or can you look my code and say what is wrong in it?

    Regards,

    Kauko

  • Hi Kauko,

    In order to access the examples in TI Resource Explorer you need to do the following:

    1) Open up CCS (I am writing the steps here using CCS 6).  If you have an older version, the steps need to be adapted accordingly.

    2) Click on View->Resource Explorer ->MSP430Ware->Development Tools->MSP-EXP430G2-> Examples->MSP430G2x32

    3) Then when all the examples show up in the right pane, scroll down to look at the following examples:

          msp430g2xx2_lpm3 and msp430g2xx2_lpm3_vlo

    I would use these examples to verify that lpm3 does only produce 1microamp. 

    In regards to your code.  When are you measuring the current?  Is it when the application is counting down the threemillisecond counter?   I also noticed that you are stoping DCO in the main function. Is there a reason for this.  Can this wait to be done when you issue the command to place the device in LPM3 mode?

     

    Regards,

    Arthi

  • A lot of people think the so called LPM3 is a mode of operation that consumes very little power. Actually, this is not true. LPM3 simply means you stopped the CPU and some of the clocks. Because the CUP and those clocks are off, It uses less power as compared with leaving CPU and those clocks on, but the chip and its I/O pins can still consume tens of mA. Further more, if something is using those clocks, it cannot go into LPM3 even if you tried.

    Watch out for the small prints when you read the specifications.

  • Hello Arthi,

    Thank you, I find examples, they use Watchdog as timer.

    In regards to my code. I measure current when threemillisecond counter value is so big that I have over second time to measure.  I try to use only VLO so that current consumption should be as low as possible. When  ADC  is runing and clock is VLO what clock is used for that? 

    I changed the principle of the sw and now I use calibrated VLO for timing and DCO 1MHz for doing. 

    According to http://www.ti.com/lit/ds/symlink/msp430g2332.pdf, page 19 current consumption is even lower by VLO than using crystal. According to figure 4  current consumption depends on supply voltage.

    I made new SW (slaa340a) for current measurement and I wonder why current consumption depends on used supply voltage so much.  There was some  problems with my testing board. Do you think it  has broken controller?

    Results: 

    2.2V      2.0uA

    2.3V      2.5uA

    2.4V      3.1uA

    2.5V       3,8uA

    ...

    3.0V        16uA

    3.1V        20.5uA

    3.6V        73uA

    Regards,

    Kauko

     

  • Sorry Arthi,

    I found that current consumption depends on the other component (leakage current of the Zener diode)  mounted on the  circuit board and MSP430G2332 is working as specified.

    Best Regards,

    Kauko

  • Well, good to know that you solved your issue!

    Best Regards,

    Arthi Bhat

**Attention** This is a public forum