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.

MSP430F2272: DCO problem using factory calibration.

Part Number: MSP430F2272

Hello,

I'm trying to use the factory calibration for a MSP430F2272IYFFT.

I'm using the following code to derive 1MHz.

BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;

Measured SMCLK clock is 870 ~910KHz.

I think this frequency is bad. Because it is much slower than 1MHz.

This is outside the tolerance range.

Other frequencies are the same.

External crystal isn't on my board so I can't calibrate and rewrite DCO data.

How can I calibrate DCO without external clock source (32768Hz Cystal)?

  • Download open source code examples (MSP430F22x2/22x4 Code Examples)...

    http://www.ti.com/lit/zip/slac123

    And use msp430x22x4_dco_flashcal from zip file tor recalibrate DCO. External 32 kHz crystal is required for recalibration. You can temporary soldier crystal to chip pins directly.

    If it is not possible to use external 32 kHz crystal, any external reference clock can be used on timer input pins. If I remember right this can be found on e2e.

  • Hi Remony,

    That is interesting.
    How many devices have you tested so far?
    Show all of them a wrong frequency?


    best regards
    Lukas
  • A while back Steve Gibson came up with a way to determine the 8 MHz calibration value for the G2231 using a valid 1 MHz factory calibration value.  Instead of using an external crystal, he used the VLO.  The VLO doesn't have to be any specific frequency, it just has to be consistent, at least during the 10-15 seconds it takes to do the test.  So if even one of the calibration values in your chip is good, you can in theory derive the others from it using that method.

    The idea is to count the VLO oscillations while counting up to about 32K in Timer A at 1 MHz.  Then you run at a guess at 8 MHz, but change the divisor to 8, and for the same number of VLO cycles, you should get the same count as before if your guess is correct.  If not, you adjust your guess and repeat until it's close enough - typically until there is a crossover from too slow to too fast.  And at that point you save the latest guess in INFO A as the 8 MHz calibration value, and Bob is assuredly your uncle. 

    I've taken Steve's work a bit further, and added the 12 and 16 MHz values, and successive approximation which allows the entire process to complete in about one second.  I was going to post all of this on Github, but backed off doing that after registering there led to a spam flood.  Is there any place at TI where I could post stuff like this.  It's all assembler, and of course the hex file, and too big to put in a post here.  Is there a wiki or some similar place for contributed code that TI clearly isn't responsible for, but which might be useful to customers?

  • two out of ten have wrong frequency.
    I made 300 boards additionally and will test it.
  • Ok, please let me know the result

**Attention** This is a public forum