External oscillator vs DCO

Discussions on how to get your MSP JTAG programmer up and running.

Moderator: phalanx

Post Reply
MostlyHarmless
Posts: 29
Joined: Wed Feb 20, 2008 11:18 pm
Location: Santa Cruz, CA

External oscillator vs DCO

Post by MostlyHarmless » Tue Apr 14, 2009 11:56 pm

Hey, all-
Building a low-power data logger. Trying to decide between the internal DCO, calibrated off a 32KHz watch crystal, and using an external crystal. I'll be switching between low-power mode (LPM3) running at 32KHz and high-power mode at 4MHz (LPM0). My thoughts so far:

1) Lowest power consumption: Don't know.
2) Quickest time to come out of LPM3: ~6 microsec for DCO, don't know for external xtal.
3) Least ISR overhead: ISR needed to keep the DCO calibrated so external xtal eliminates this overhead.
4) Board space: DCO wins this one.

I'd appreciate any thoughts folks have, especially other considerations I'm missing.

slaa074 is a good app note discussing a calibrated DCO using a low frequency crystal. And this method is mentioned in several TI docs and other places. Haven't found much about using an external oscillator wrt 1 and 2 above. 3 and 4 seem obvious.

Thanks!
Cheers,
MH

OldCow
Posts: 269
Joined: Sun Mar 26, 2006 10:04 am

Post by OldCow » Wed Apr 15, 2009 8:51 am

It depends on how accurate the clock frequency is needed for the application.

An external crystal or clock can provide very accurate frequency. (Better than +-0.1%)

Using DCO and software FLL with an external watch crystal periodically provides about +-1% accuracy. If the operation voltage and temperature does not vary that much, you do not need to do FLL very often. In some cases, you only need to do FLL once at power-up.

Using the factory calibration stored in InfoA (available for F2xx only) with no FLL provides about +-3% accuracy. But it work only if the factory data in InfoA is not erased or altered.

For some applications, the DCO frequency is accurate enough without doing any adjustment.

MostlyHarmless
Posts: 29
Joined: Wed Feb 20, 2008 11:18 pm
Location: Santa Cruz, CA

Post by MostlyHarmless » Wed Apr 15, 2009 11:20 am

Thanks, OC.

So external xtal should allow higher UART data rates. I'll add:

5) Highest UART data rate: external xtal wins because of best frequency accuracy.

Still researching stabilization time and power use for each option...
Cheers,
MH

MostlyHarmless
Posts: 29
Joined: Wed Feb 20, 2008 11:18 pm
Location: Santa Cruz, CA

Post by MostlyHarmless » Fri Apr 17, 2009 11:33 am

Wrt #2 in my first post, I found a TI app note that waits 18ms for a 3.58MHz xtal to stabilize (slaa123.pdf). And in the MSP430 user's guide I found these steps to run switch the MCLK from DCO to XT2:

1) Switch on the crystal oscillator
2) Clear the OFIFG flag
3) Wait at least 50 µs
4) Test OFIFG, and repeat steps 1-4 until OFIFG remains cleared.

So 50 micro secs seems like an absolute minimum.

I think I'll add an external xtal to my design just to measure the stabilization time.

So to update #2:

2) Quickest time to come out of LPM3: ~6 microsec for DCO stable, 50us to 18ms for external HF xtal. DCO wins but need to confirm with some tests.

Cheers,
MH

Post Reply