Jump to content

Signs of external crystal failure

Recommended Posts

I am currently working on a project that uses the external crystal for the watchdog timer and the internal DSO clock for all other tasks. The crystal is 32kHz. The watchdog timer interrupt is taking care of controlling the state machine in the main loop.

At first sight everything looks ok. However, after a while (hours later) the controller (MSP430G2553) appears to be stuck. Closer investigation show that this is due to the watchdog timer interrupt not served, means that the 32Khz clock is not present.


I already tried to play with the XTAL capacitor settings to no effect.


I am wondering if scope measures could be done in order to see if there is something ongoing in the clock circuit that could point to an issue with the XTAL capacitors, driver circuit, parasitics, etc. However, I do not know what exactly to look for.


Can anyone help me here?

Link to post
Share on other sites

One thing you can do is implement the IRQ for that - an ISR for the NMI_VECTOR interrupt vector.  You need to set the OFIE bit in IE1 to activate the interrupt handler for that fault, then check OFIFG in the ISR itself and do something appropriate to signal it as such.


If that ISR never fires, then something weird is going on... i.e. the MSP430 isn't detecting the XTAL stopping.  I thought the MSP430 is supposed to fail-safe back to the VLOCLK when that happens, but I might be wrong about that.  Your NMI_VECTOR handler code could do it manually I guess (set/clear appropriate BCSCTL3 bits to set ACLK=VLO).

Link to post
Share on other sites

One quick way of testing an external crystal is to freeze it and see how well it recovers.


To freeze it quickly, I use Canned Air turned upside down. This will release the liquid propellant which happens to come out at some ridiculously low temperature like -70'C.


Frozen condensation will appear rapidly on whatever you spray it at so be selective.


In my experience, never has this condensation damaged a circuit that I was testing. 


For added torture, get out your hot air gun and heat that crystal a minute after you've frozen it with the cold spray.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...