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.

MSP430F5438 reset problem

Other Parts Discussed in Thread: MSP430F5438

 I designed a product using MSP430F5438. It is powered by battery and the PCB & battery are molded by epoxy for waterproof. So the power is NEVER turned off.

In some case the board reset itself using WDT and in other case reset occurred from voltage drop of battery. In my board, reset itself is not a serious problem if it works normally after reset.

My company has manufactured the product more than 20-thousand from 3 years ago. Unfortunately some of my product died in recent days. They died and don’t works.

We tested the product prior to delivery in regular manner and it works normally several months in customer’s site. Then they suddenly died. I collected and checked them. Their status is;

-      VCC pins are high

-      RST/NMI pin is high

-      but XIN and XOUT are LOW(no bias) - my board use external oscillator

-      Cannot find any abnormal status from other pins.

When I reset them (assert low shortly at RST/NMI pin or turn off->on power), they work normally. – in this case XIN and XOUT has bias and external oscillator runs again.

It is very hard to make the same fault status. I tried but failed.

I am not sure but I think this problem came from reset because XIN and XOUT are LOW. In my board, these pins must have DC bias right after reset. My firmware is started as follows;

WDTCTL = WDTPW | WDTHOLD;

UCSCTL3 |= SELREF_2;

P7SEL |= 0x03;

UCSCTL6 &= ~(XT1OFF

UCSCTL6 |= XCAP_3;

UCSCTL4 &= 0xF8FF;

UCSCTL4 |= SELA_0;

 

__bis_SR_register(SCG0);

UCSCTL0 = 0x0000;

UCSCTL1 = DCORSEL_6;

UCSCTL2 = FLLD_1 + 249;

__bic_SR_register(SCG0);

__delay_cycles(250000);

 

Please help me. Thank you.

  • It's possible that something has change P7SEL to 0, so XIN/XOUT turned to I/O mode.
    It can have several reasons, maybe a yet undetected software bug, a radiation fluke (unlikely but possible), whatever.


    If your code doesn't notice that XT1 has ceased functioning, but still triggers the WDT, the device will not reset but also not work properly.

    Possible solutions: don't trigger the WDT unless the XT1 driven part of the code has signalled that XT 1is still working (e.g. the ISR of an XT1-driven timer sets a flag, and the WDT is only triggered if the flag is set (and resets the flag then).

    Or you enable the OSC fault NMI and force a reset of the device if this NMI ISR is called. So once XT1 fails to oscillate, the device will reset.

    Note that ACLK, when driven from LF-XT1, will revert to REFO on the 5438, but SMCLK, when driven by XT1, will simply stop.

  • JMG,

    When LF-XT1 has a fault condition (XT1LFOFFG), REFO almost always stands in for XT1.  Even for SMCLK and MCLK (UG 5.2.12).  The WDT, however, uses VLO instead of REFO under these conditions (UG 16.2.5).

    So an XT1 fault cannot stop ACLK, SMCLK, or MCLK, even if they are supposed to be driven from XT1.  Neither can an XT1 fault stop the WDT when it is configured to use XT1.  In that case, the WDT Clock Fail-Safe feature uses VLO instead.  The timeout period is longer than expected, but the watchdog is still working and will still reset the device.

    To the OP,

    With XT1OFF = 0, the only way XT1 should stop oscillating is if (1) the circuit design isn't right or doesn't match the firmware configuration or (2) the P7SEL bits became clear or (3) the device attempted to operate outside of specifications.  (I'm ignoring true hardware failures.)

    One suggestion related to #3 especially for battery powered applications is to set the SVSHMD bit in SVSMHCTL in the PMM.  This adds high-side supervision even when in LPM.  Strange things can happen if there is a divot on the supply voltage while the MCU is asleep.

       PMMCTL0_H = PMMPW_H;  // Unlock write access to the PMM registers.
       SVSMHCTL |= SVSHMD;   // Keep SVS active on high side even in LPMx
       PMMCTL0_H = 0;        // Lock write access to the PMM registers.

    Jeff

  • JMG & Jeff

    Thanks for your advices.

    When I posted this question I thought there is no DC bias at XIN and XOUT because I checked 0V on those two pins with oscilloscope. But today I found another thing, those pins are not simply 0V. When I touch the probe of oscilloscope on the pin, those two pins are few micro-seconds high then fell down. (This phenomenon is found at XIN and XOUT pin only. And the waveform like below was appeared in my oscilloscope every time when I touched one of those two pins with probe.)

    The peak voltage is 1~2V. (3.6V battery is connected to my board)

    I can’t understand the meaning. I guess that DC bias is added to those pins but It is impossible to maintain the voltage by some reason (current shortage or …). Is it correct? If not, please let me know the reason.

    sholee

  • Jeff Tenney said:
    REFO almost always stands in for XT1.  Even for SMCLK and MCLK (UG 5.2.12)

    You're right, on 5x family, SMCLK has a fallback too. However, on 1x, 2x or 4x family, SMLK simply stops.

    About the strange peak on XIN: it may be that there is some charge building up at the pin by crosstalk or leakage currents, which is discharged as soon as the probe is connected through the probe input impedance. Note that  a crystal is a capacitor of its own.

**Attention** This is a public forum