Olimex Support Forum

Microcontrollers => MSP430 => Topic started by: Jürgen Wissenwasser on December 23, 2012, 01:02:53 PM

Title: Severe quartz clock mismatch
Post by: Jürgen Wissenwasser on December 23, 2012, 01:02:53 PM
Hi!

I've recently bougth a MSP430-H5438.

The quartz clock is nothing but inaccurate - the SMCLK-output was fed into a (calibrated!) frequency counter and a value of 33055 was measured which also explained my firmware problems.
33055 Hz are 8760ppm above the set value and frequency tolerance. Moreover, a jitter of almost 1500ppm was found.

Did I just get a bad board/bad quartz onboard or is this a common problem with your boards?
Title: Re: Severe quartz clock mismatch
Post by: Chester Gillon on December 23, 2012, 11:38:40 PM
The MSP430F5438 has an internal REFO with a nominal frequency of 32768Hz. If there is a fault with the crystal on XT1, or if the firmware hasn't enabled the XT1 oscillator, then the MSP430F5438 will use the REFO as a "fall back".

If the REFO is being used to source the SMCLK that could explain the measured frequency and jitter errors.

Does the firmware enable the XT1 oscillator and check for any clock faults?
Title: Re: Severe quartz clock mismatch
Post by: Jürgen Wissenwasser on January 07, 2013, 11:06:55 AM
The clock is working. I checked it via oscilloscope and also fed it to the SMCLK output (P4.7).

Also, the XT1LFOFFG flag was not set.

Varying XCAP values led to a very small change in the effective frequency on SMCLK hence I can assume that XT1 is working.

Meanwhile I ordered a few quartz models and will exchange the existing one on the board.