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.

Issue with Vcore on F5438

Hi TI employee,

    The coustomer  is a 3P E-meter manufacturer. They have consumed nealy 4 miilion units of F5438   on 3P E-meter for the past 3-4 years.

A problem occurs this time , after power on , the LCD can not display any information. First , they guess the cause is a LFXT1 oscillate fault issue.

However,Digging the issue deeply , they found LFXT1 failure is just a consequence of another issue——Vcore = 0V after pown on.  

In the Application code, they confugure JTAG pin to OUTPUT direction (output low level) , when the issue occurs ,we found the JTAG pins are 1.2 ~1.4V.

It looks like PC is not activated after power on and the JTAG pins have 't initialized yet.

By asserting the RESET pin to low and then realase the pin  or power off and then power on again  both  solve the problem,and it's quite diffcuclt to reproduce

this issue again.This is a serious quality hidden trouble. So , they pay great concerns on this batch of products, and need TI's help on this case.TI Local FAE has

no clue temporarily, so pasting the issue on the forum maybe is a shortway to give us a hint .

Thanks .

SeaFesse.

  • Hi SeaFesse,

    I have a few quick questions so that I can help debug your issue:

    1) What is the operating frequency of your DCO?
    2) What Vcore level are you operating at? If a higher Vcore level, do you immediately set this level or step up to it one level at a time?

    Please have the FAE you spoke of contact me directly.

    Regards,
    Ryan
  • Hello Ryan,

    Thanks for your quick response.

    1) What is the operating frequency of your DCO?

    ------16MHz when 220V  is on , 1MHz when 220V is off (powered by Li-battery).

    2)2) What Vcore level are you operating at? If a higher Vcore level, do you immediately set this level or step up to it one level at a time?

    -----They set  the Vcore  level is PMMCOREV_2.  I'll paste the code.   Besides, I have sent  the link of this post  to TI local FAE.

    Here is the code:

    void Init_PMM(void)												//11.08.25	
    {
      
         PMMCTL0_H = 0xA5;                                          //开PMM电源管理                             
         SVSMLCTL = SVSMLRRL_1 + SVSLRVL0 + SVMLE +SVSLE;             //配置SVML电压
         PMMCTL0 =  PMMPW + PMMCOREV_2;                             //配置内核电压
         PMMCTL1 =  0; 						                        //					//11.08.24
         while((PMMIFG & SVSMLDLYIFG ) == 0);                       //等待设置完成
         SVSMHCTL = SVMHE+SVSMHRRL2+SVSMHRRL0+(SVSHRVL0+SVSHRVL1+SVSHE)+SVSHMD; 	
         SVSMIO = SVMOUTPOL;										//同缺省值
         PMMIFG = 0;												//清中断标记
         PMMRIE = SVMHIE+SVSHPE;//打开SVS掉电中断,DVCC检测地于ITSVM(SVS H H_IT+)产生中断
    }
    
    void PwrOnInit(void)
    {
    
    	P7SEL = 0x03;
    
    	Init_PMM();
    
    	UCSCTL0 = 0x0200;						//V4
    	UCSCTL1 = DCORSEL_4;					//DCO范围10~30M		//V4
    	UCSCTL2 = FLLD__4 + 0x7F;				//MCLK=32768*128*4=16M		SMCLK = MCLK / 4 = 4M
    	UCSCTL3 = FLLREFDIV_0 + SELREF__XT1CLK;	//XT1打开、XT2关闭
    	UCSCTL4 = SELM__DCOCLK + SELS__DCOCLKDIV + SELA__XT1CLK;	//MCLK=DCOCLK、SMCLK=DCOCLK/DCOCLKDIV、ACLK=XT1CLK
    	UCSCTL5 = DIVM_0 + DIVS_0 + DIVA_0 + DIVPA_0;
    	UCSCTL6 = XT2OFF;
    
    }
    
    void PwrOffInit(void)
    {
    	P7SEL = 0x03;
    
    	Init_PMM();
    
    	UCSCTL0 = 0x0200;						//V4
    	UCSCTL1 = DCORSEL_1;					//DCO范围1~2M
    	UCSCTL2 = FLLD__1 + 0x1F;				//MCLK=32768*32=1M		SMCLK = MCLK = 1M
    
    	UCSCTL3 = FLLREFDIV_0 + SELREF__XT1CLK;	//XT1打开、XT2关闭
    	UCSCTL4 = SELM__DCOCLK + SELS__DCOCLKDIV + SELA__XT1CLK;	//MCLK=DCOCLK、SMCLK=DCOCLK/DCOCLKDIV、ACLK=XT1CLK
    	UCSCTL5 = DIVM_0 + DIVS_0 + DIVA_0 + DIVPA_0;
    	UCSCTL6 = XT2OFF;
    	
    }

  • SeaFesse,

    Your customer error is occurring because they are immediately stepping up to PMMCOREV_2 without first stepping intto PMMCOREV_1.  It is imperative that they change the core voltage one level at a time.  Here is a common subfunction used to step up a level while checking appropriate flags to make sure that the voltage has had time to settle:

    void SetVcoreUp (unsigned int level)
    {
      // Open PMM registers for write
      PMMCTL0_H = PMMPW_H;              
      // Set SVS/SVM high side new level
      SVSMHCTL = SVSHE + SVSHRVL0 * level + SVMHE + SVSMHRRL0 * level;
      // Set SVM low side to new level
      SVSMLCTL = SVSLE + SVMLE + SVSMLRRL0 * level;
      // Wait till SVM is settled
      while ((PMMIFG & SVSMLDLYIFG) == 0);
      // Clear already set flags
      PMMIFG &= ~(SVMLVLRIFG + SVMLIFG);
      // Set VCore to new level
      PMMCTL0_L = PMMCOREV0 * level;
      // Wait till new level reached
      if ((PMMIFG & SVMLIFG))
        while ((PMMIFG & SVMLVLRIFG) == 0);
      // Set SVS/SVM low side to new level
      SVSMLCTL = SVSLE + SVSLRVL0 * level + SVMLE + SVSMLRRL0 * level;
      // Lock PMM registers for write access
      PMMCTL0_H = 0x00;
    }

    Also attached is a UCS code example for stepping up to PMMCOREV_3 for a DCO frequency of 25 MHz (F534x device, but the logic remains the same).  Please recommend to the customer that the implement these changes immediately.  

    /* --COPYRIGHT--,BSD_EX
     * Copyright (c) 2012, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     *
     *******************************************************************************
     * 
     *                       MSP430 CODE EXAMPLE DISCLAIMER
     *
     * MSP430 code examples are self-contained low-level programs that typically
     * demonstrate a single peripheral function or device feature in a highly
     * concise manner. For this the code may rely on the device's power-on default
     * register values and settings such as the clock configuration and care must
     * be taken when combining code from several examples to avoid potential side
     * effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
     * for an API functional library-approach to peripheral configuration.
     *
     * --/COPYRIGHT--*/
    //******************************************************************************
    //   MSP430F534x Demo - Software Toggle P1.1 with 25MHz DCO
    //
    //   Description: Toggle P1.1 by xor'ing P1.1 inside of a software loop.
    //   ACLK is rought out on pin P1.0, SMCLK is brought out on P2.2, and MCLK
    //   is brought out on pin P4.7.
    //   ACLK = REFO = 32kHz, MCLK = SMCLK = 25MHz
    //
    //                MSP430F5529
    //             -----------------
    //         /|\|                 |
    //          | |             P1.0|-->ACLK
    //          --|RST          P4.7|-->MCLK
    //            |             P2.2|-->SMCLK
    //            |                 |
    //            |             P1.1|-->Port Pin toggle
    //
    //   Bhargavi Nisarga
    //   Texas Instruments Inc.
    //   Jun 2011
    //   Built with CCSv4 and IAR Embedded Workbench Version: 4.21
    //******************************************************************************
    #include <msp430.h>
    
    void SetVcoreUp (unsigned int level);
    
    int main(void)
    {
      volatile unsigned int i;
    
      WDTCTL = WDTPW+WDTHOLD;                   // Stop WDT
      
      PMAPPWD = 0x02D52;                        // Enable Write-access to modify port mapping registers
      P4MAP7 = PM_MCLK;
      PMAPPWD = 0;                              // Disable Write-Access to modify port mapping registers
      
      P1DIR |= BIT1;                            // P1.1 output
    
      P1DIR |= BIT0;                            // ACLK set out to pins
      P1SEL |= BIT0;                            
      P2DIR |= BIT2;                            // SMCLK set out to pins
      P2SEL |= BIT2;                            
      P4DIR |= BIT7;                            // MCLK set out to pins
      P4SEL |= BIT7;           
    
      // Increase Vcore setting to level3 to support fsystem=25MHz
      // NOTE: Change core voltage one level at a time..
      SetVcoreUp (0x01);
      SetVcoreUp (0x02);  
      SetVcoreUp (0x03);  
      
      UCSCTL3 = SELREF_2;                       // Set DCO FLL reference = REFO
      UCSCTL4 |= SELA_2;                        // Set ACLK = REFO
    
      __bis_SR_register(SCG0);                  // Disable the FLL control loop
      UCSCTL0 = 0x0000;                         // Set lowest possible DCOx, MODx
      UCSCTL1 = DCORSEL_7;                      // Select DCO range 50MHz operation
      UCSCTL2 = FLLD_0 + 762;                   // Set DCO Multiplier for 25MHz
                                                // (N + 1) * FLLRef = Fdco
                                                // (762 + 1) * 32768 = 25MHz
                                                // Set FLL Div = fDCOCLK/2
    
      __bic_SR_register(SCG0);                  // Enable the FLL control loop
      
      // Worst-case settling time for the DCO when the DCO range bits have been
      // changed is n x 32 x 32 x f_MCLK / f_FLL_reference. See UCS chapter in 5xx
      // UG for optimization.
      // 32 x 32 x 25 MHz / 32,768 Hz ~ 780k MCLK cycles for DCO to settle
      __delay_cycles(782000);
    
      // Loop until XT1,XT2 & DCO stabilizes - In this case only DCO has to stabilize
      do
      {
        UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
                                                // Clear XT2,XT1,DCO fault flags
        SFRIFG1 &= ~OFIFG;                      // Clear fault flags
      }while (SFRIFG1&OFIFG);                   // Test oscillator fault flag
      
      while(1)
      {
        P1OUT ^= BIT1;                          // Toggle P1.0
        __delay_cycles(600000);                 // Delay
      }
    }
    
    void SetVcoreUp (unsigned int level)
    {
      // Open PMM registers for write
      PMMCTL0_H = PMMPW_H;              
      // Set SVS/SVM high side new level
      SVSMHCTL = SVSHE + SVSHRVL0 * level + SVMHE + SVSMHRRL0 * level;
      // Set SVM low side to new level
      SVSMLCTL = SVSLE + SVMLE + SVSMLRRL0 * level;
      // Wait till SVM is settled
      while ((PMMIFG & SVSMLDLYIFG) == 0);
      // Clear already set flags
      PMMIFG &= ~(SVMLVLRIFG + SVMLIFG);
      // Set VCore to new level
      PMMCTL0_L = PMMCOREV0 * level;
      // Wait till new level reached
      if ((PMMIFG & SVMLIFG))
        while ((PMMIFG & SVMLVLRIFG) == 0);
      // Set SVS/SVM low side to new level
      SVSMLCTL = SVSLE + SVSLRVL0 * level + SVMLE + SVSMLRRL0 * level;
      // Lock PMM registers for write access
      PMMCTL0_H = 0x00;
    }
    

    Regards, Ryan

**Attention** This is a public forum