First of all, the calibration bytes are for the DCO, not for Xtal.
TI factory writes these bytes in the Info-A Flash. IAR and other tools are normally set up
to leave Info-A Flash un-touched and thus the factory calibration bytes will stay there.
But, you can intentionally or by mistake unintentionally erase or over write the Info-A
Flash and thus trash these calibration bytes.
If the firmware intends to use them, it has to copy the contends of the calibration bytes
into the DCO registers. For example:
BCSCTL1 = CALBC1_12MHZ;
DCOCTL = CALDCO_12MHZ;
where CALBC1_12KHZ and CALDCO_12MHZ are symbolic names of 12MHz calibration bytes in
Info-A Flash, and BCSCTL1 and DCOCTL are symbolic names of DCO control registers. These
symbolic names are defined in the header files supplied by TI and included in the
tools.
However, if the calibration bytes in Info-A Flash were trashed. The above code will not
set up the DCO correctly, and may even crash the system.
To restore the calibration bytes (if they are trashed), you need to use a XTAL or some
know clock source as a reference and re-calibrate the DCO. TI has an application note tell
you how to do that using a 32.768kHz watch crystal as reference.
--- In m...@yahoogroups.com, "Douglas"
wrote:
>
> I am just starting to work with my eZ430-RF2500 and the IAR Embedded Workbench IDE. How
does one usually handle the clock calibration byte CALBC1_8MHZ? Do I have to read this
from the old code in the chip, insert it into the code to be programmed, and then program
the new code, or does the Workbench IDE handle this magically on its own? If the value is
lost is there a simple way of finding it short of trial & error?
>
> Thanks,
> SherpaDoug
>
------------------------------------
______________________________
controlSUITE software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )My microcontroller class is using the book, "MSP430 State Machine Programming with the
ES2274" by Tom Baugh. In it, he has us use some of his software to read out the DCO
calibration data and save it for later restoration.
Emmett Redd Ph.D. mailto:E...@missouristate.edu
Professor (417)836-5221
Department of Physics, Astronomy, and Materials Science
Missouri State University Fax (417)836-6226
901 SOUTH NATIONAL Dept (417)836-5131
SPRINGFIELD, MO 65897 USA
"In theory there is no difference between theory and practice. In practice there is." --
Yogi Berra or Jan van de Snepscheut
> -----Original Message-----
> From: m...@yahoogroups.com [mailto:m...@yahoogroups.com]
> On Behalf Of old_cow_yellow
> Sent: Tuesday, October 27, 2009 2:43 PM
> To: m...@yahoogroups.com
> Subject: [msp430] Re: Preserving Xtal calibration byte
>
> First of all, the calibration bytes are for the DCO, not for Xtal.
>
> TI factory writes these bytes in the Info-A Flash. IAR and
> other tools are normally set up to leave Info-A Flash
> un-touched and thus the factory calibration bytes will stay
> there. But, you can intentionally or by mistake
> unintentionally erase or over write the Info-A Flash and thus
> trash these calibration bytes.
>
> If the firmware intends to use them, it has to copy the
> contends of the calibration bytes into the DCO registers. For example:
> BCSCTL1 = CALBC1_12MHZ;
> DCOCTL = CALDCO_12MHZ;
> where CALBC1_12KHZ and CALDCO_12MHZ are symbolic names of
> 12MHz calibration bytes in Info-A Flash, and BCSCTL1 and
> DCOCTL are symbolic names of DCO control registers. These
> symbolic names are defined in the header files supplied by TI
> and included in the tools.
>
> However, if the calibration bytes in Info-A Flash were
> trashed. The above code will not set up the DCO correctly,
> and may even crash the system.
>
> To restore the calibration bytes (if they are trashed), you
> need to use a XTAL or some know clock source as a reference
> and re-calibrate the DCO. TI has an application note tell you
> how to do that using a 32.768kHz watch crystal as reference.
> --- In m...@yahoogroups.com, "Douglas"
wrote:
> >
> > I am just starting to work with my eZ430-RF2500 and the IAR
> Embedded Workbench IDE. How does one usually handle the
> clock calibration byte CALBC1_8MHZ? Do I have to read this
> from the old code in the chip, insert it into the code to be
> programmed, and then program the new code, or does the
> Workbench IDE handle this magically on its own? If the value
> is lost is there a simple way of finding it short of trial & error?
> >
> > Thanks,
> > SherpaDoug
> >
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )