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.

CCS: MSP430F6638

Part Number: MSP430F6638

Tool/software: Code Composer Studio

Hii

I have a problem with VBAT current consumption in LPM3

I am using MSP430F6638 processor 

VBAT current consumption without LPM3 is 0.1 micro Amp but with LPM3 is 1 micro Amp 

How can reduce VBAT current consumption in LPM3 

Can you please reply me.

its urgent

  • Hi,

    What do you say about the VBAT current consumption? Is this the current consumption on VCC and GND of the MSP430 device or including all the components powered on the board?

    Could you share the test code you are doing? 

  • Hi,

    We connected an external 3.0V CR1216 battery for VBAT Pin and we supply 3.3V to the VCC pin from regulated power supply. We are measuring the current  with ammeter on the CPU VBAT pin.

    Note:-No other components are connected to VBAT.

    When the CPU is in active mode the current consumption on the VBAT pin is 0.1 uA. When i put the CPU in LPM3 the current consumption goes up to 1.17 uA. This current consumption seems to change with VBAT voltage. For example.

    VBAT     Current

    2.815V    0.245uA

    3.020V    0.645uA

    3.120V    0.840uA

    3.290V    1.170uA

    I have verified that LOCKBAK remains zero when the CPU is in LPM3. This indicates that the CPU is still running from the VCC and not VBAT.

    Since the VCC is always 3.3V, why is the CPU drawing current from the VBAT pin? Why is the current increasing when i put the CPU in LPM3 mode? 

    Please find the attached project which reproduce the above issue. 

    // (c)2010 by Texas Instruments Incorporated, All Rights Reserved.
    /*----------------------------------------------------------------------------+
    |                                                                             |
    |                              Texas Instruments                              |
    |                                                                             |
    |                          MSP430 USB-Example (CDC/HID Driver)                |
    |                                                                             |
    +-----------------------------------------------------------------------------*/
    /*  Source: main.c, v2.0 2009/08/03       
    -------------------------------------------------------------------------------+
    Local Echo Demo:
    
     This USB demo example is to be used with a PC application (e.g. HyperTerminal)
     The demo application demonstartes a local echo; Characters that are 
     transmitted from PC are echoed back.
    
     NOTE: In order to see the local echo in Hyper Terminal goto File -> Propoerties 
     -> Settings -> ASCII Setup and check the "Echo Typed Characters Locally"
    
    ------------------------------------------------------------------------------+
     Please refer to the MSP430 USB API Stack Programmer's Guide,located 
     in the root directory of this installation for more details.
    ------------------------------------------------------------------------------*/
    
    
    
    
    #include<msp430f6638.h>
    #include <math.h>
    #include <string.h>
    #include <intrinsics.h>
    
    
    
    /*----------------------------------------------------------------------------+
    | Main Routine                                                                |
    +----------------------------------------------------------------------------*/
    #define st(x)      do { x } while (__LINE__ == -1)
    #define SELECT_MCLK_SMCLK(sources) st(UCSCTL4 = (UCSCTL4 & ~(SELM_7 + SELS_7)) | (sources);)
    #define USB_MCLK_FREQ 4000000                // MCLK frequency of MCU, in Hz
    void Port_init(void);
    void FLL_config(unsigned int fsystem, unsigned int ratio);
    
    void main(void)
    {
            WDTCTL = WDTPW + WDTHOLD; // Stop WDT
    
            __disable_interrupt(); // Disable global interrupts
            Port_init();
    
            while(BAKCTL & LOCKBAK) // Unlock XT1 pins for operation
                BAKCTL &= ~(LOCKBAK);
    
    		 // Setup Clock
    		UCSCTL6 &= ~(XT1OFF);                  // XT1 On
    		UCSCTL6 |= XCAP_3;                        // Internal load cap
    
    		do
    		{
    					UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);   // Clear XT2,XT1,DCO fault flags
    					SFRIFG1 &= ~OFIFG;                                                        // Clear fault flags
    		}while (SFRIFG1&OFIFG);                                                             // Test oscillator fault flag
    
    		// Start the FLL, which will drive MCLK (not the crystal)
    		FLL_config(USB_MCLK_FREQ/1000, USB_MCLK_FREQ/32768);                  // set FLL (DCOCLK)
    
    		__enable_interrupt();                                              // enable global interrupts
    		RTCCTL01 |= RTCRDYIE + RTCHOLD;             // BCD mode, RTC hold, enable RTC read ready interrupt
    		RTCSEC=0;
    		RTCMIN=0;
    		RTCHOUR=10;
    		RTCDAY=12;
    		RTCMON=6;
    		RTCYEAR=19;
    		RTCCTL01 &= ~(RTCHOLD);
    
    		TA0CTL = TASSEL_1 +ID_3+ MC_1+TACLR;
    		TA0CCR0 =9;
    		TA0CCTL0 = CCIE;
    
    		while(1)
    		{
    			  __bis_SR_register(LPM3_bits);
    			  __no_operation();
    			  __no_operation();
    		}
    }
    
    void FLL_config(unsigned int fsystem, unsigned int ratio)
    {
    	unsigned int d, dco_div_bits;
    	unsigned int mode = 0;
    
    
    	unsigned int srRegisterState = __get_SR_register() & SCG0;
    	__bic_SR_register(SCG0);
    
    	d = ratio;
    	dco_div_bits = FLLD__2; // Have at least a divider of 2
    
    	if (fsystem > 16000) {
    	d >>= 1 ;
    	mode = 1;
    	}
    	else {
    	fsystem <<= 1; // fsystem = fsystem * 2
    	}
    
    	while (d > 512) {
    		dco_div_bits = dco_div_bits + FLLD0; // Set next higher div level
    		d >>= 1;
    	}
    
    	UCSCTL0 = 0x0000; // Set DCO to lowest Tap
    	UCSCTL2 &= ~(0x03FF); // Reset FN bits
    	UCSCTL2 = dco_div_bits | (d - 1);
    
    	if (fsystem <= 630) // fsystem < 0.63MHz
    	UCSCTL1 = DCORSEL_0;
    	else if (fsystem < 1250) // 0.63MHz < fsystem < 1.25MHz
    	UCSCTL1 = DCORSEL_1;
    	else if (fsystem < 2500) // 1.25MHz < fsystem < 2.5MHz
    	UCSCTL1 = DCORSEL_2;
    	else if (fsystem < 5000) // 2.5MHz < fsystem < 5MHz
    	UCSCTL1 = DCORSEL_3;
    	else if (fsystem < 10000) // 5MHz < fsystem < 10MHz
    	UCSCTL1 = DCORSEL_4;
    	else if (fsystem < 20000) // 10MHz < fsystem < 20MHz
    	UCSCTL1 = DCORSEL_5;
    	else if (fsystem < 40000) // 20MHz < fsystem < 40MHz
    	UCSCTL1 = DCORSEL_6;
    	else
    	UCSCTL1 = DCORSEL_7;
    
    	while (SFRIFG1 & OFIFG) { // Check OFIFG fault flag
    			  UCSCTL7 &= ~(DCOFFG+XT1LFOFFG+XT1HFOFFG+XT2OFFG); // Clear OSC flaut Flags
    			  SFRIFG1 &= ~OFIFG; // Clear OFIFG fault flag
    	}
    
    	if (mode == 1) { // fsystem > 16000
    			SELECT_MCLK_SMCLK(SELM__DCOCLK + SELS__DCOCLK); // Select DCOCLK
    	}
    	else {
    		   SELECT_MCLK_SMCLK(SELM__DCOCLKDIV + SELS__DCOCLKDIV); // Select DCODIVCLK
    	}
    
    		   __bis_SR_register(srRegisterState); // Restore previous SCG0
    
    }
    
    void Port_init(void){
    
    	P1SEL=0X00;
    	P2SEL=0X00;
    	P3SEL=0X00;
    	P4SEL=0X00;
    	P5SEL=0X00;
    	P6SEL=0X00;
    	P7SEL=0X00;
    	P8SEL=0X00;
    	P9SEL=0X00;
    
    	P1DIR= 0XFF;
    	P2DIR= 0XFF;
    	P3DIR= 0XFF;
    	P4DIR= 0XFF;
    	P5DIR= 0XFF;
    	P6DIR= 0XFF;
    	P7DIR= 0XFF;
    	P8DIR= 0XFF;
    	P9DIR= 0XFF;
    
    	P1OUT=0X3f;
    	P2OUT=0X00;
    	P3OUT=0X00;
    	P4OUT=0X00;
    	P5OUT=0X00;
    	P6OUT=0X00;
    	P7OUT=0X00;
    	P8OUT=0X00;
    	P9OUT=0X3f;
    
    }
    
    
    #pragma vector=RTC_VECTOR
    __interrupt void RTC_ISR(void)
    {
         while(BAKCTL & LOCKBAK)
           BAKCTL &= ~(LOCKBAK);
    
      switch(__even_in_range(RTCIV,14))
      {
       case  0: break;                           // Vector  0:  No interrupt
       case  2:
    
    	   // Vector  2:  RTCRDYIFG (RTC ready)
    	   RTCCTL01 &= ~(RTCRDYIFG);
    	   break;
       case  4: break;                           // Vector  4:  RTCEVIFG // RTC interval timer
       case  6: break;                           // Vector  6:  RTCAIFG// alarm
       case  8: break;                           // Vector  8:  RT0PSIFG //prescalar0
       case 10: break;                           // Vector 10:  RT1PSIFG // prescale 1
       case 12: break;                         // Vector 12:  RTCOFIFG
       case 14: break;                           // Vector 14:  Reserved
       default: break;
      }
    }
    
    // Timer0 A0 interrupt service routine
    #pragma vector=TIMER0_A0_VECTOR
     __interrupt void TIMER0_A0_ISR(void)
    {
    	 //timer value = 2.44140625 msec
    }
    

  • Hi,

    looks like the subsystem supplied by VBAT during power loss or LPMx.5 gets also supplied during LPM3.

    Can you please let us know the current consumption into the DVCC pass? Based on the specificaiton it should only happen during primary supply (DVCC) falls below the SVS level in case BAKDIS =0 (see users guide chapter 3.2).

    So can you please check if it helps to write BAKDIS=0 before you go into LPM3?

  • Hi,

        we write BAKDIS=0 before entering into LPM3 but the current consumption of VBAT is not changed

       Current consumption of  VCC is 0.4mA in LPM3. We are measuring current with ammeter on Battery positive pin

     

     

  • I also have a similar problem on msp430f66338. Current is drawn from the vbat pin in lpm3 mode.

    Is there any workaround for this?

  • Hi,

    so when you measure 0.4 mA in LPM3 on DVCC means 400 uA you are not in LPM3, please check if you really mean mA or uA?

  • Hi,

    We haven’t heard from you for more than a week, so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information. If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum