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.

MSP430F5359: LPM3 using external crystal XT2

Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP430F5436


I have an MSP430F5359 processor on a board with an external
14Mhz XT2 crystal .  XT2 is used as the clock source for ACLK and SMCLK.
The timer ISR used to blink an LED uses ACLK as the clock source.

The  power consumption does not drop when XT2 is used as
the clock for ACLK when entering LPM3. It appears that he processor does
not go into sleep mode when XT2 is used as the clock source.

If the clock source for ACLK is changed to REFOCLK  (UCSCTL4 = SELA__REFOCLK  + SELS__REFOCLK  +  SELM__XT2CLK )
the power consumption drops down when entering LPM3 and things appear to work correctly.


Any ideas on why we continue to burn power when the external crystal is used as the clock source for ACLK in LPM3 ? .



// Timer1 interrupt service routine
#pragma vector=TIMER1_A0_VECTOR
__interrupt void TIMER1_A0_ISR(void) {
    P8OUT ^= BIT1; // Toggle LEDs
}

int main( void )
{
    
    WDTCTL = WDTPW + WDTHOLD;  
    
    P1SEL = 0x00; P1DIR = 0x00; P1IE = 0x00;
    P2SEL = 0x00; P2DIR = 0x00; P2IE = 0x00;
    P3SEL = 0x0F; P3DIR = 0x00;
    P4SEL = 0x00; P4DIR = 0x00;
    P5SEL = 0x00; P5DIR = 0x00;
    P6SEL = 0x00; P6DIR = 0x00;
    P7SEL |= BIT2+BIT3;
    P8SEL = 0x00;  P8DIR |= 0x02;
    P9SEL = 0x00; P9DIR = 0x00;
    
    UCSCTL0 = 0x0000;        
    
    UCSCTL1 = DISMOD + DCORSEL_0;
    
    UCSCTL2 = FLLN0 + FLLD_0;   
    
    UCSCTL3 = SELREF__REFOCLK | FLLREFDIV_0;
    
   // UCSCTL4 = SELA__REFOCLK  + SELS__REFOCLK  +  SELM__XT2CLK ;   //LPM3 works with low current consumption
    UCSCTL4 = SELA__XT2CLK  + SELS__REFOCLK  +  SELM__XT2CLK ; //The current consumption is about 80 ma
    
    UCSCTL5 = DIVM__1 + DIVS__16 + DIVA__16;
    
    UCSCTL6 = XT1OFF+ XCAP_3+XT1DRIVE_0+XT2OFF + XT2DRIVE_0;
    
    UCSCTL8 = 0x00; //disable conditional clock requests
    
    while(SFRIFG1 & OFIFG) {                // Check OFIFG fault flag
    while ( (SFRIFG1 & OFIFG))            // Check OFIFG fault flag
    {    
        // Clear OSC fault flags
        UCSCTL7 &= ~(DCOFFG + XT1LFOFFG + XT1HFOFFG + XT2OFFG);// Clear XT2,XT1,DCO fault flags
        SFRIFG1 &= ~OFIFG;                // Clear OFIFG fault flag
    }
    UCSCTL6 &= ~(XT1DRIVE1_L+XT1DRIVE0);// Reduce the drive strength
    }
    
    
    TA1CCTL0 = CCIE;                      
    TA1CCR0 = 50000;
    TA1CTL = TASSEL_1 + MC_1 + TACLR; // ACLK is the clock source
    
    __bis_SR_register(LPM3_bits + GIE);       // Enter LPM3, enable interrupts
    __no_operation();
    
    }

  • The XT2 oscillator circuit uses power. Section 5.2.5 of the User's Guide says:

    XT2 is enabled under any of the following conditions:

    • XT2 is a source for ACLK (SELA = {5,6,7}) and in active mode (AM) through LPM3 (OSCOFF = 0)
      […]

    If you don't want to leave XT2 running, select a different clock source for ACLK. If you want to disable ACLK, use LPM4 instead.

  • Thanks a lot for the prompt reply.

    I do understand that XT2 will be running if it is selected as a clock for ACLK which is active in LPM3. The problem is that on the MSP430F5359 chip, when XT2 is used as the clock source for ACLK the power consumption is > 200 mW.



    I also happen to have a MSP430F5436AIZQW chip clocked using a 7 MHz
    crystal connected to the XT2 pins available. Code with pretty much the same
    configuration shown above and using the XT2 crystal to source the ACLK in LPM3
    consumes less than 3 mW on this chip.


    Why is the XT2 crystal oscillator so power hungry on the MSP430F5359 chip while it performs pretty well on the MSP430F5436AIZQW chip.

    Are there any workarounds available to reduce power consumption on the MSP430F5359 chip when the XT2 oscillator is in use ?.
  • What's concerning about this is that the same code running on the MSP430F5436 burns about 3mW, while that code on the MSP430F5359 burns around 240mW. That's a huge difference. In both cases the processor is in LPM3 most of the time except for when the timer goes off. In the timer ISR, we change the state of an output to the LED and go back to sleep. Pretty simple. 

    Can anyone who is familiar with these processors explain this huge difference in power consumption? 

    TI chose to move to a forum model for support but we've been at this for more than a few weeks and have yet to see much help, which is frustrating. We'd be quite grateful if someone could shed some light on this issue.

  • All,

    please note that the F5436 is a different device than the F5359. Looking to the user's guide it's explained in detail under which conditions the XT2 stays enabled.

    So expect that the XT2 stays on in LPM3 if it is used for ACLK sourcing the timer as described in user's guide:

    So I would say the F5359 behaves like it is specified more interesting is the F5436. As you can see in the user's guide already this device is handled separatly and it is not recommended for new designs anymore.

    So please check if UCS2 of the F5436 ERRATA sheet applies to you:

  • Thanks so much for the reply, Dietmar.

    The problem is not that the clock is enabled - it should be in both cases. The problem is that the F5359 is burning 1/4 of a watt when it is spending most of its time in LPM3. With both processors the XT2 clock is enabled and the timer ISR wakes up periodically to change the state of the pin to an LED, yet the F5436 burns only 3mW while the F5359 burns almost 100x more power. It looks like something is preventing the F5359 from entering LPM3.

    Thanks again so much for your time on this!

    Rich

  • Rich,

    to be sure that I got everyting correct this is your clock scheme correct:

    XT2 has a 14 MHz crystal and is used with Drive Level 1

    ACLK = XT2CLK / 16 = ~875 kHZ

    SMCLK = REFOCLK / 16 =  ~2 kHz

    MCLK = XT2CLK / 1 = 14 MHz

    Timer A is sourced with ALCK  means runs with 875 kHz.

    Now your F5436 is consuming 3mW means 9 mA at DVCC=3.0V

    But the F5359 consumes 240 mW means 80 mA at DVCC=3.0V

    So even if we would not enter LPM3 80mA is too much even in Active Mode if your running with the setup above.

    But looking at your code I have idea where it migh come from:

        P1SEL = 0x00; P1DIR = 0x00; P1IE = 0x00;
        P2SEL = 0x00; P2DIR = 0x00; P2IE = 0x00;
        P3SEL = 0x0F; P3DIR = 0x00;
        P4SEL = 0x00; P4DIR = 0x00;
        P5SEL = 0x00; P5DIR = 0x00;
        P6SEL = 0x00; P6DIR = 0x00;
        P7SEL |= BIT2+BIT3;
        P8SEL = 0x00;  P8DIR |= 0x02;
        P9SEL = 0x00; P9DIR = 0x00;

    You set all your GPIOs to input floating therefore you can have high unpredictable current consumption even on the F5436.

    Please terminate these pins either by pull all unused pins externally low or enalbe pull up/downs or set them up to output direction and drive a high or low.

    Please check if this helps?

  • You are correct with the settings you mentioned, and yes we are seeing around 73mA @3.28V, which does seem excessive. 

    Per your suggestion, we have tried putting the ports to output direction PxDIR = 1 , driving the outputs low ( PxOUT = 0x00), driving the outputs high(PxOUT = 0xFF), enabling the pullup/pulldown resistor (PxREN =1) , disabling the pullup/pulldown resistor (PxREN =0). All these did not reduce the power consumption of the XT2 oscillator in LPM3.

     

       P1SEL = 0x00; P1DIR = 0xFF; P1IE = 0x00; P1OUT = 0x00; P1REN = 0xFF;

        P2SEL = 0x00; P2DIR = 0xFF; P2IE = 0x00; P2OUT = 0x00;P2REN = 0xFF;

        P3SEL = 0x0F; P3DIR = 0xFF; P3OUT = 0x00;P3REN = 0xFF;

        P4SEL = 0x00; P4DIR = 0xFF; P4OUT = 0x00;P4REN = 0xFF;

        P5SEL = 0x00; P5DIR = 0xFF; P5OUT = 0x00;P5REN = 0xFF;

        P6SEL = 0x00; P6DIR = 0xFF; P6OUT = 0x00;P6REN = 0xFF;

        P7SEL |= BIT2+BIT3; P7OUT = 0x00;P1REN = 0xFF; P7REN = 0xFF;

        P8SEL = 0x00;  P8DIR = 0xFF; P8OUT = 0x00;P8REN = 0xFF;

        P9SEL = 0x00; P9DIR = 0xFF; P9OUT = 0x00;P9REN = 0xFF;  

    That was definitely worth trying, but I'm not surprised at the outcome since we can get the power to drop low by changing the ACLK source from XT2 to the internal clock:

    // UCSCTL4 = SELA__REFOCLK + SELS__REFOCLK + SELM__XT2CLK ; //LPM3 works with low current consumption
    UCSCTL4 = SELA__XT2CLK + SELS__REFOCLK + SELM__XT2CLK ; //The current consumption is about 80 ma

    Thanks as always for the help!!

    Rich

  • Has anyone done any power measurements on the MSP430F5359 where the CPU is in a low power mode (such as LPM3) with a timer running off of an external XT2 crystal?

    Thanks,
    Rich

  • MSP430F5359 chip still burns a lot of power even in LPM3 when the XT2 oscillator is enabled. We know that the XT2 oscillator in LPM3 on the F5436 chip burns 100x less power . We have followed your suggestions regarding changing the status of the GPIO pins but have been unable to bring the power consumption down.

    Please advice if you know of any other reasons why XT2 oscillator might consume a lot of power on the MSP430F5359 chip.
  • We finally got a MSP-TS430-PZ100C target board. I added a crystal to the XT2 input and ran the code which we've been using on our other target. In idle mode (spinning in a while loop while the timer occasionally wakes up and toggles an LED), the CPU was consuming about 7mW. When I changed the while loop to an LPM3 call, the power dropped to around 1mW. That's significantly less than the 240mW we're seeing on our board.

    I think we may have a damaged CPU or two - I'm having some new boards built to test that. I'll post results when I get them.
  • Hi Rich,

    sorry for late reply but the correlation tests you did are very helpful. I checked our former database and we did not saw any signficant issues with XT2 and LPM3. The next step would be that I try to recreate you behavior.

    But if you cannot do on a TI reference board using the code you posted above I would assume I also cannot reproduce. So please keep us posted once you performed tests with new boards and let us know if it's related to the PCB or damaged parts.

  • Rich,

    I retested your posted code on a F6659 RevA device in PZ package using a 16 MHz crystal (14 MHz was not available) and the code works fine and the device consumes ~435uA without a LED connected. So either your PCB has a problem or your parts are really damaged. Please keep us updated once you have verified your new PCB.
  • Assuming that the processors were damaged I had another board built with only the processors and external crystals (and the necessary passives for a circuit like that). I loaded the code an measured out circuit once again. Still 240mW with an external crystal. I then went back over the schematic an noticed that we'd hooked up VCORE to the 3.3V rail, which is an error. It's not quick to verify that this could be the source of the issue, so the question is: could that be enough to cause the CPU to draw so much power? If so, why would it only show up when the external clock was enabled?

    I'm guessing so, but it'd be nice to see if someone with better knowledge of what's inside the chip agrees. I'd hate to spin the board and be wrong.

    Thanks,
    Rich

  • Rich,

    thanks for the update. I would not wonder if this damages the device somehow because the Vcore domain is a low voltage domain and the transistors are not made for this stress. I think I don't need to mention that this is out of specificaiton!

    You have to disconnect Vcore from DVCC and and the 470nF capacitor as it is specified otherwise the function and spec is not guaranteed.

    I woudl assume you also see higher current when you only run with 1 MHz but the values are lower comparing this this with a HF crystal.
    In the end it's pretty hard to tell what happnes in detail because for this conditions the device is not made.

    Anyway great that you found the root cause for this behavior!

**Attention** This is a public forum