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.

MSP430F5438A: 1% of boards built will have the application code stall

Part Number: MSP430F5438A
Other Parts Discussed in Thread: MSP430WARE,

Hi Experts!

Background:

My customer is having around 1% fallout where his MSP430 application will stall, like the oscillator is not transitioning. 

For a small percentage of boards in the field the main application, stops soon after the  Main Applications configuration of the clocks.

I am still trying to determine exactly  where, but the current draw is small and static.   

A scope probe shows that the 25mhz clock is correctly oscillating.

 

The fault can be duplicated by rapid cycling of power to the board, right around the operational trip point of the micro.

Here is the kicker:  On successive clean power-ups the board will continue to fail right after the second set of clock initializations.

 

The fault can be cleared by rapid cycling of power to the board, after which it will start normally.

Code:

The firmware starts with a Boot Strap Section which verifies the main code before doing a blind jump to the main code.

It has the following Clock initialization code( which is pretty much consistent with TI examples ):

 

           ----------------   BSL        ---------------------

 

    SetVCore(3); 

 

         P5SEL |= BIT2+BIT3;                       // Port select XT2

         UCSCTL6 &= ~XT2OFF;                       // Enable XT2

         

                                                   // set drive strength [01] for 12mhz

         UCSCTL6 &= ~(XT2DRIVE1);                 // turn off drive bit 1

         UCSCTL6 |=   XT2DRIVE0 ;                 // turn on  drive bit 0

         

                                                   // set drive strength [00] for 32khz

         UCSCTL6 &= ~(XT1DRIVE1);                 // turn off drive bit 1

         UCSCTL6 &= ~(XT1DRIVE0);                 // turn off drive bit 1 

           

           

          // Set up XT1

         P7SEL |= BIT0+BIT1;                       // Select XT1

         UCSCTL6 &= ~(XT1OFF);                     // XT1 On

 

        

       // Loop until XT1,XT2 & DCO stabilizes - in this case loop until XT2 settles

  do

  {

    UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);

                                            // Clear XT2,XT1,DCO fault flags

    SFRIFG1 &= ~OFIFG;                      // Clear fault flags

  }   while (SFRIFG1&OFIFG);                   // Test oscillator fault flag

   

 

        UCSCTL4 = 0X0055;  //Aclk= Xt1, SMclk = Xt2,  Mclk = XT2clk

       

        UCSCTL1 |=  DISMOD  ;  // turn off modulation

 

 

{  after doing a checksum check on main application memory it jumps to Main Application   }

 

 

----------------------   Main Application  ------------------------------------

{  Where it goes through a similar clock start up process  }

{ This redundancy was done because the nature of the BSL doesn’t lend itself to emulation during debugging}

 

 SetVCore(3); 

 

         P5SEL |= BIT2+BIT3;                       // Port select XT2

         UCSCTL6 &= ~XT2OFF;                       // Enable XT2

         

                                                   // set drive strength [01] for 12mhz

         UCSCTL6 &= ~(XT2DRIVE1);                 // turn off drive bit 1

         UCSCTL6 |=   XT2DRIVE0 ;                 // turn on  drive bit 0

         

                                                   // set drive strength [00] for 32khz

         UCSCTL6 &= ~(XT1DRIVE1);                 // turn off drive bit 1

         UCSCTL6 &= ~(XT1DRIVE0);                 // turn off drive bit 1 

           

           

          // Set up XT1

         P7SEL |= BIT0+BIT1;                       // Select XT1

         UCSCTL6 &= ~(XT1OFF);                     // XT1 On

 

        

       // Loop until XT1,XT2 & DCO stabilizes - in this case loop until XT2 settles

  do

  {

    UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);

                                            // Clear XT2,XT1,DCO fault flags

    SFRIFG1 &= ~OFIFG;                      // Clear fault flags

  }while (SFRIFG1&OFIFG);                   // Test oscillator fault flag

   

        UCSCTL4 = 0X0055;  //Aclk= Xt1, SMclk = Xt2,  Mclk = XT2clk

       

        UCSCTL1 |=  DISMOD  ;  // turn off modulation

 

 

This is just a duplication of code.

Questions:

 

  1. Is it okay to SetVcore(3) twice?
  2. The drive strength was set incorrectly for a 25MHz clock which was ultimately used in assembly.
    1. Even though the clock apprears to oscillate normally, is the internal clocking of the MSP affected?
  3. Generally speaking, is it OK to manipulte the UCS registers twice?

Thanks!

Reed

  • Hey Reed,

    Sorry for my last post, I'll try and confirm if using the SetVcore() function is actually fine.

    Edit: I wasn't able to locate this function as part of MSP430ware, so probably a customer written function.    

    Thanks,

    JD

  • Hey Reed,

    It's interesting that you report that the device stalls but the clock is still running.  If so, then it doesn't really sound like a clock fault.  Did I understand this correctly or is the clock actually failing in these cases? 

    I am concerned with how Vcore is being set and the fact that this issue is happening right at startup.   Do you have the source for the setVcore() Function?    

    This process for setting Vcore is defined in section 2.2.4 of the MSP430F5438A Family's User's Guide and includes a code example, here: http://www.ti.com/lit/ug/slau208q/slau208q.pdf   

    I want to confirm that the customer has implemented this.  

    Thanks,

    JD

  • JD,

    Thanks for the feedback. If the SetVcore() is not a problem, where else could we look? 

    1. Is it okay to SetVcore(3) twice? Answer = Seems to be ok?
    2. The drive strength was set incorrectly for a 25MHz clock which was ultimately used in assembly.
      1. Even though the clock appears to oscillate normally, is the internal clocking of the MSP affected?
    3. Generally speaking, is it OK to manipulate the UCS registers twice?

    Thanks,

    Reed

  • JD,

    Please let me know your comments to the 3 questions.

    Thanks,

    Reed

  • Hey Reed,

    1.  Setting the Vcore register twice should be fine although the 2nd iteration probably shouldn't even change the setting as it will already be set to 3.  Again, there is a process for changing Vcore outlined in the datasheet, that the customer must follow. 

    2. As long as the crystal is oscillating, then there shouldn't be any issue with the clock due to drive strength.  The main concern is if it's too low, it's possible there could maybe be power or temperature conditions could cause the crystal not to oscillate.     

    3. Generally, I don't see any issue with setting the UCS registers again as long as you go back through the stabilization process again.  

    Thanks,

    JD

  • Hey Reed,

    Does the issue always happen around power-up?  The customer says " The fault can be duplicated by rapid cycling of power to the board, right around the operational trip point of the micro."  This could be causing some issues.    

    Is the SVS enabled, holding the MCU in reset?  

    How far down is VCC dropping before being rapidly being brought back up?  

    Is Vcore dropping due to VCC dropping?  

    If a full, clean power cycle, does the issue ever present?  

    I'm imagining there could be a scenario when dropping VCC and bringing up without a full reset could possibly cause Vcore to drop and cause MCLK speed violations.  I would suggest spending some time here.   

    Thanks,

    JD

  • Hey Reed,

    Did they figure out the issue?  

    Thanks,

    JD

  • JD,

    Thanks for following up.

    They have isolated the problem to a sequence that happens when they exit reset. By adding some arbitrary time delay, this problem has gone away.

    Thanks for the support!
    Reed

**Attention** This is a public forum