kenyee 5 Posted August 14, 2013 Share Posted August 14, 2013 There's an example in the codevault on restoring the DCO calibration data, but it seems to require that the external crystal be hooked up. I have a semi-bricked surface mount MSP430...the calibration values are apparently 0xff, so it goes into the fault routine immediately on startup... Quote Link to post Share on other sites
pabigot 355 Posted August 14, 2013 Share Posted August 14, 2013 Modify the code to use an external 32 kiHz clock on TACLK instead of internally connecting to ACLK? Quote Link to post Share on other sites
roadrunner84 466 Posted August 14, 2013 Share Posted August 14, 2013 Most code examples use a start block including disabling the WDT and then loading the DCO values. However, without DCO values, your clock should go to a base value (RSEL=7, DCO=3). This base value is very inaccurate, but enables you to load code and reconfigure the DCO calibartion values. To actually calibrate, you must use a reference. The external crystal is a much used reference. Since you overwritten the DCO calibration values, you cannot restore them, you can only recalibrate. Quote Link to post Share on other sites
oPossum 1,083 Posted August 14, 2013 Share Posted August 14, 2013 You can find them with this: http://forum.43oh.com/topic/1375-characterize-dco-without-32768-khz-xtal/ That doesn't write them to info memory, so you would have to write some code to do that. Quote Link to post Share on other sites
ike 53 Posted August 15, 2013 Share Posted August 15, 2013 https://github.com/RickKimball/msp430_code/blob/master/fabooh/examples/serial/dco_calibrate/goldilocks.cpp tingo and tripwire 2 Quote Link to post Share on other sites
tripwire 139 Posted August 15, 2013 Share Posted August 15, 2013 https://github.com/RickKimball/msp430_code/blob/master/fabooh/examples/serial/dco_calibrate/goldilocks.cpp That's a nice way to calibrate without needing external components (other than a PC, which you kind of need anyway ) I was going to suggest a rather more hands-on approach. 1) Write a program to toggle the red LED every second and the green one every minute (assuming a DCO frequency of 1MHz) 2) Start the program, and compare the blink rate with a stopwatch 3) Tweak the DCO settings up or down as appropriate to get the green LED flash frequency to match the minutes on the stopwatch. 4) Write down the DCO settings that produce the desired frequency 5) Repeat for 8, 12 and 16MHz 6) Write another program to flash the various calibration values to the information memory Simple! Quote Link to post Share on other sites
kenyee 5 Posted August 16, 2013 Author Share Posted August 16, 2013 Thanks. Decided to just desolder the part and swap a new one in. I think it got corrupted when I tried to program it w/ the standard 2.2nf capacitor...got an error about not being able to write block zero, but I think it did in some corrupted way that took out the DCO calibration values. I swapped the cap w/ a 1nf one and it downloads code cleanly now but the DCO is broken :-P Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.