MSP430FR5849: SMCLK stops at low temperatures.

Part Number: MSP430FR5849

ACLK is LFXTCLK connected to an external 32.768kHz signal.

SMCLK divides DCOCLK.

It is operating in LPM4 mode.

Under normal temperatures, it transitions to AM mode when an interrupt occurs.

However, at low temperatures (approximately -10°C), it does not transition to AM mode.

When monitoring SMCLK (8MHz) output to the port,

SMCLK stopped at low temperatures. It resumed operation when the temperature returned to normal.

ACLK (32.768kHz) was also monitored. This was outputting normally.

The LFXTOFF bit is always kept clear.

Is there a way to avoid the phenomenon where SMCLK stops?

 

  • Hi Ichiro,
    Is this behavior occurring with multiple devices, or just one single device?

    Best Regards,

    Diego Abad

  • いいえ。30台中2台で発生しています。

    ichiro

  • Hi Ichiro,
    If only two units out of the thirty were affected, the issue may have arisen from damage during the application process or from inherent defects in those devices. Are there any notable differences between the two affected units and the remaining twenty‑eight?
    Best regards,
    Diego Abad
  • No differences were found compared to normal products.

    The lot numbers were identical.

    No abnormalities were found during microscopic visual inspection.

    There is no possibility of dropping or impact.

  • Hi Ichiro,

    Are there any other peripherals in the faulty devices that are also failing? What about the current consumption of the device? Can the customer share the schematic for their system?
    Best Regards,

    Diego Abad

  • 周辺デバイスに不具合は確認されていません。

    不具合のマイコンを正常品に置換えると機器は正常に動作します。
    バッテリー駆動ではないので、消費電力は気にしていません。
    回路図の共有は困難です。

  • Hi Ichiro,
    Interesting. In that case, the root cause seems to be very likely the devices. However, it is till unsure whether this was a defect from factory, or if device got damaged at one point.  

    Best Regards,

    Diego Abad

  • Errata MSP430FR5849(slaz453z) PMM31 Description に

    「The same behavior can appear when SMCLK is requested during a power mode
    transition from AM to LPM3/4.」との記載があります。

    発生する要因に低温条件は関係するのでしょうか?

    この不具合は、常温で確認されなかったので問題視していませんでした。

  • Hi Ichiro,

    This would mean that the customer is doing something different in this two units while operating their application. Otherwise, we will see the same behavior in the other devices. Is there a flowchart of the flow of the code of the customer?

    Best Regards,

    Diego Abad

  • 下記にファームの一部を記載します。

    各ペリフェラルの初期設定した後、LPM4設定のdo文に移行しています。

    void main(void)
    {
     WDTCTL = WDTPW | WDTHOLD; /* Stop Watchdog */


     init_MSP430FR(); /*初期設定*/

    loop_wait_event:

     /* ポート割込み要因許可 */

     /* 1秒タイマー割込み許可*/

     do{
      __bis_SR_register(LPM4_bits | GIE); // Enter LPM4 w/interrupt
      __no_operation(); // For debugger

      __bic_SR_register(GIE); // disable interrupt
      __no_operation(); // For debugger

      if(event.bit.DETECT_RELAY_CREAR){ // プッシュSW検知
       break;
      }
     } while(1);

     /* プッシュスイッチの処理 */

     goto loop_wait_event;
    }

    初期設定内に配置されているシステムクロック設定

    void init_SystemClk(void)
    {
     /* Clock system register */
     PJSEL0 = BIT4 | BIT5; // For XT1
     // Disable the GPIO power-on default high-impedance mode to activate
     // previously configured port settings
     PM5CTL0 &= ~LOCKLPM5;
     // Clock System Setup
     CSCTL0 = CSKEY; // Unlock CS registers
     /* SLAZ453Z CS12 DCO overshoot at frequency change */
     /* Keep overshoot transient within specification by setting clk sources to divide by 4*/
     /* Clear the DIVS & DIVM masks (~0x77)and set both fields to 4 divider */
     CSCTL3 = DIVA__1 | DIVS__4 | DIVM__4;
     CSCTL1 = DCOFSEL_4 | DCORSEL; // Set DCO to 16MHz
     CSCTL4 &= ~LFXTOFF;
     /* Delay by ~10us to let DCO settle.  */
     __delay_cycles(60);
     CSCTL2 = SELA__LFXTCLK | SELS__DCOCLK | SELM__DCOCLK;
     CSCTL3 = DIVA__1 | DIVS__2 | DIVM__2; // ACLK=32.768kHz,SMCLK=8MHz,MCLK=8MHz OK
     /* CS_Control_Register_5 Clock Failure Flag */
     do
     {
      CSCTL5 &= ~LFXTOFFG; // Clear XT1 fault flag
      SFRIFG1 &= ~OFIFG;
     } while(SFRIFG1 & OFIFG); // Test oscillator fault flag

     CSCTL0_H = 0; // Lock CS registers
     // Now that osc is running enable fault interrupt
     SFRIE1 |= OFIE;
     return;
    }

    1秒周期のタイマー内でWDT_CLEARしています

    WDTCTL = WDT_ARST_16s;

  • Hi Ichiro,
    It is is true that if the device enter LPM4, SMCLK and MCLK will stop working. How is the customer clearing the LPM4 in their ISRs? They will need to add the "__bic_SR_register_on_exit(LPM4_bits);" to allow the other lines after "__bis_SR_register(LPM4_bits | GIE);"  to be executed. 

    Best Regards,

    Diego Abad

  • 返信、ありがとうございます。

    ポート割込み発生による割込み処理中には、ご指摘のとおり、

    「__bic_SR_register_on_exit(LPM4_bits);」を実行しています。

    下記に、該当する割込み処理を記載します。

    #pragma vector=PORT3_VECTOR
    __interrupt void PORT3_ISR(void)
    {
     if(P3IFG & BIT5){
     P3IFG &= ~BIT5;
     event.bit.DETECT_RELAY_SWITCH = TRUE;
      __bic_SR_register_on_exit(LPM4_bits); // Exit LPM4
      __no_operation();
     }
    }

  • Hi Ichiro,
    This looks good to me. One last thing I want to check, can the customer confirm if the watchdog is sourced from ACLK?

    Best Regards,

    Diego Abad

  • はい。RTC割込みの1秒周期の箇所に下記のWDT_CLEARを配置しています。

    RTCはACLKで動いています。

    WDTCTL = WDTPW+WDTCNTCL+WDTSSEL0+WDTIS1+WDTIS0;

  • 教えてください。DCOCLKの発信元についてです。

    MSP430FR2xxxは、XT1を発信元にできました。

    しかし、MSP430FR5xxxのClockSystemの内部ブロック図を参照すると、

    XT1に繋がっていません。DCOCLKの発信元は内部RC発振(LC発振)なのでしょうか?

  • Since the line of code to enable the watchdog is just free floating, it is impossible to tell when, or even if, it executes.

    But if the dog is enabled, no code to periodically reset it has been shown. So when the code that waits for a GPIO interrupt enters LPM4 (actually LPM3 since the dog needs LFXT), nothing resets the watchdog. So 16 ms later, more or less, the device is reset.

    If the GPIO event you are expecting to cause an exit from LPM4 happens during that reset process, then it will be lost.

  • WDCは、RTC割込みの1秒周期の箇所に下記のWDT_CLEARを配置しています。

    #pragma vector=RTC_VECTOR
    __interrupt void RTC_ISR(void)
    {
    switch(RTCIV){
    case RTCIV_NONE: /* No Interrupt pending */
    break; // No interrupt
    case RTCIV_RTCAIFG: /* RTC user alarm: RTCAIFG */
    break;
    case RTCIV_RT0PSIFG: /* RTC prescaler 0: RT0PSIFG */
    break;
    case RTCIV_RT1PSIFG: /* RTC prescaler 1: RT1PSIFG */
    RTCPS1CTL_bit.RT1PSIFG = 0u;

    IWDT_Restart(); // WDT clear

    break;
    case RTCIV_RTCOFIFG: /* RTC Oscillator fault */
    break;
    default:
    break;
    }
    }

    もし、WDTに起因する要因なら、なぜ 低温(約-10°C)になるとSMCLKが停止する現象が発生するのでしょうか?

  • Information continues to dribble out.

    Missing here is the RTC configuration. It has to get its clock from somewhere...

    Oh, using a timer interrupt to reset the watchdog is pretty much useless.  Some ideas on good watchdogs: www.ganssle.com/watchdogs.pdf

  • すみません。客先の希望で全てを公開することができません。

    このファームは、常温では正常に動作しています。

    低温になると動作が停止し、WDTが発生しています。常温に戻ると正常に動作しはじめます。

    低温の状態でもACLK(32.768kHz)が動作いていることは確認されています。

    ACLKをRTCに供給しています。

    不具合の要因がWDTに起因するとは思えません。

**Attention** This is a public forum