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.

MSP430F2131如何进行时钟校准

我使用的芯片是MSP430F2131,我查看芯片手册,发现该芯片没有XT2时钟源,而使用高频时钟只能采用DCOCLK。
我需要一个12M的时钟源,但是出厂的DCOCLK精度达不到我们的要求,因此我们需要对DCOCLK校准,然而主时钟也得用DCOCLK,所以好像达不到预期的效果,请问这种情况我们还可以采取什么手段来校准DCO时钟呢

  • 关于DCO精度的问题,你一般需要考虑两个因素,一个是芯片的工作电压,一个是工作温度。

    一般说DCO的精度,都会考虑在全温度范围,还是室温,工作电压时可变的,还是固定的某一个具体的电压值。

    MSP430F2131的DCO的精度,可以参考datasheet的23页,里面很详细的说明了在室温下,全温下,不同工作电压下的温度。

    https://www.ti.com.cn/cn/lit/ds/symlink/msp430f2131.pdf 

    关于校准参数,我们提供了相关的程序

    http://dev.ti.com/tirex/explore/node?node=AFBWDiHlS1d3fquUBkb3LQ__IOGqZri__LATEST 

    //******************************************************************************
    //  MSP430F21x2 Demo - DCO Calibration Constants Programmer
    //
    //  NOTE: THIS CODE REPLACES THE TI FACTORY-PROGRAMMED DCO CALIBRATION
    //  CONSTANTS LOCATED IN INFOA WITH NEW VALUES. USE ONLY IF THE ORIGINAL
    //  CONSTANTS ACCIDENTALLY GOT CORRUPTED OR ERASED.
    //
    //  Description: This code re-programs the F2xx DCO calibration constants.
    //  A software FLL mechanism is used to set the DCO based on an external
    //  32kHz reference clock. After each calibration, the values from the
    //  clock system are read out and stored in a temporary variable. The final
    //  frequency the DCO is set to is 1MHz, and this frequency is also used
    //  during Flash programming of the constants. The program end is indicated
    //  by the blinking LED.
    //  ACLK = LFXT1/8 = 32768/8, MCLK = SMCLK = target DCO
    //  //* External watch crystal installed on XIN XOUT is required for ACLK *//
    //
    //           MSP430F21x2
    //         ---------------
    //     /|\|            XIN|-
    //      | |               | 32kHz
    //      --|RST        XOUT|-
    //        |               |
    //        |           P1.0|--> LED
    //        |           P2.1|--> SMLCK = target DCO
    //
    //  A. Dannenberg
    //  Texas Instruments Inc.
    //  December 2007
    //  Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.41A
    //******************************************************************************

    另外我们提供了

    https://www.ti.com/lit/an/slaa336a/slaa336a.pdf