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.

CCS/MSP430FR5043: LFXT failure on MSP430FR5043

Part Number: MSP430FR5043

Tool/software: Code Composer Studio

In our temperature rig tests we have occasionally seen instances of a failed LFXT (32.768kHz) crystal on our MSP430FR5043 design. We detected this failure as our timers were no longer accurate and we determined that the ACLK clock which was now running on MODOSC (39kHz) rather than the LFXT input due to the LFXT failure. We believe that the LFXT failure is likely due to the fact that our temperature chamber is not humidity controlled and, as such, the PCBs would get wet when warmed up from cold. This is a bit unfair on the crystal and ideally we’d have the PCBs sealed or humidity control the chamber. Neither of these options are easily available at present and in reality the fault only occurs occasionally. In the FW I have now implemented a feature that regularly checks the LFXT fault failure flag [CS_LFXTOFFG]. If I find it in the failed state then I enter the failure in our diagnostic logs and clear the flag. We are now monitoring the diagnostic logs after our rig tests to see if any units have shown the LFXT failure.

 

From my bench tests I can see that the crystal shows a failure if I place a drop of water on it (perhaps no surprise!). If I then dry the crystal it returns to life. Note that this is without having to power reset the unit or clear any flags internally – other than the CS_LFXTOFFG flag which I clear regularly during the fault polling. Once the crystal dries I see that the CS_LFXTOFFG flag is no longer being set. So as far as I am concerned things work as stated in the MCU datasheet.

 

However, we have had two instances of separate PCBs failing and then NOT recovering. Both these meters subsequently had the power disconnected and reconnected and the PCB then recovered. However, we have yet to capture a recent live failure and analyse it properly.

 

Can it be confirmed that I am handling the LFXT failure properly? i.e. there is no bit I am supposed to set/clear to force the LFXT to recover or reconfigure? From what I see and read the LFXT user configuration is returned to once the LFXT failure recovers (i.e. ACLK will again use the LFXT automatically once the LFXT starts to run again). Is there some instance that the ACLK will remain on the MODOSC without some user intervention?

 

  • Hey Martin,

    It's hard to follow what you are doing without seeing the code, but in short, it sounds like what you are doing is mostly correct.  You have to clear LFXTOFFG and wait to see if the fault is still occurring.

    There is a code example showing this failsafe feature using the LFX fault interrupt.  I would compare this to your implementation.  It waits for the fault to clear indefinitely, which is not going to be ideal.  But it shows the process and gives you a code example to test with : http://dev.ti.com/tirex/explore/node?node=ANzTApbnUuLvaONZ95r6ug__IOGqZri__LATEST    

    Thanks

    JD

  • Hi JD,

    Thanks for the response. I have looked at the example code and I see that it is using the interrupt abilities of the clock failure module. I do not do this. I just poll the fault flag in my main loop. If I find that it is in a failure state then I just clear the LFXTOFFG flag and set a diagnostic bit in my FW. I make no attempt to try and fix the fault as I do not believe there is anything I can do. I just have to leave the MCU running on MODOSC until my LFXT comes back to life - dries out. When it does I expect that the clock module will automatically swap ACLK back to LFXT and stop holding the LFXTOFFG flag set. This is correct isn't it? i.e. I don't have to do anything to force ACLK back to the LFXT input.

    Regards,

    Martin

  • Hey Martin,

    Yes, you are correct that all you need to do is clear the flag and the clock should auto switch back from MODOSC when there is not fault.   

    This isn't stated anywhere, but I would personally probably still delay for a short period of time if the fault flag doesn't come back to allow the oscillator to switch and stabilize.  Again, this doesn't seem to be required, but if you can spare the time in your application, I might test it out.  

    Thanks

    JD

  • Maybe you've already considered this, but I'll throw it in anyway: Oscillator startup is measured in clock (crystal) ticks, so slower crystals/oscillators take longer.

    They're also proportionally slower in startup than fast crystals when operating in low temperatures. I've seen a 32kHz crystal take most of a minute to start up down near 0F. That said: I was never able to get an operating (already started) 32kHz crystal to fail by lowering the temperature.

    [Edit: Fixed some ambiguous wording.]

**Attention** This is a public forum