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.

MSP430F47126 Quartz correction using DCO?

Hi everybody

I'm using the Capture register of TimerA1 TACCR1 in order to measure the 32768Hz quartz error at room temperature.

Basically I supply a 1Hzsignal with 1ppm error and after a certain numer of seconds i calculate the difference on the TACCR register.

More or less i used the idea found on slap107 (implementing a Temperature Compensated RTC).

The system works quite well, but in order to achieve a <5ppm compensation @25°C I must run the calibration for about 30s.

Someone told me to use SMCLK (in my case is 1.048576MHz) to source Timer A (i.e. to use DCO instead of the quartz  to calculate the error).

I don't have a clear idea about how DCO and FLL work, but I suspect that the error of SMCLK is not equal to the quartz error.

Am I  wrong?

Do you have some ANs or links to suggest me?

 

Thanks in advance

 

 

 

 

  • Andrea,

    I think I understand what that person was telling you, and it's an interesting idea.  I don't know of any ANs or links to give you.

    The FLL does duplicate the PPM error from the 32768Hz quartz oscillator into the DCO.  Ideally speaking, the errors match.

    However, the FLL is really only changing the setting of the clock modulator.  The clock modulator alternates between two discrete frequencies following one of 32 predefined ratios to use one of the frequencies more often than the other.  The FLL adjusts the modulator settings to get as close as possible to the target frequency as judged by the 32768Hz quartz reference.

    Based on that understanding, I wouldn't use the FLL for such precise calibration operations.

    Furthermore, the FLL has some pretty serious bugs that could complicate your efforts even more.

    If you don't have (and can't acquire) a decent frequency counter, then I think your current approach is quite good.  (GPS PPS signal?)  However, after only 10 seconds, you have 327680 ticks.  Wouldn't that be enough to get you < 5 ppm?  You might not really need 30 seconds, which gets you nearly 1 million ticks (for < 2 ppm).

    Jeff

  • Thank you Jeff,

    Yes, we was just brainstorming of possible solution to speed up the quartz calibration process.

    So far I noticed that 30s gives me a very stable a repeatable result, I can try to reduce down to 10s

    BTW, since I'm working with the capture interrupt I suppose i could do other tasks in parallel

    (maybe the LCD verification).

    But, again, I'm talking without doing any real tests

     

    Thank you

     

    Andrea

     

**Attention** This is a public forum