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.

F2001 Set DCO问题

Other Parts Discussed in Thread: MSP430F2001, MSPWARE, MSP-GANG

问题大概是这样的:

公司板子使用了贵司MSP430F2001,因板子小巧,只能使用DCO时钟,MSP430F2001.h文件中已定义了:

#define CALDCO_16MHZ_ (0x10F8u) /* DCOCTL Calibration Data for 16MHz */
READ_ONLY DEFC( CALDCO_16MHZ , CALDCO_16MHZ_)
#define CALBC1_16MHZ_ (0x10F9u) /* BCSCTL1 Calibration Data for 16MHz */
READ_ONLY DEFC( CALBC1_16MHZ , CALBC1_16MHZ_)
#define CALDCO_8MHZ_ (0x10FCu) /* DCOCTL Calibration Data for 8MHz */
READ_ONLY DEFC( CALDCO_8MHZ , CALDCO_8MHZ_)
#define CALBC1_8MHZ_ (0x10FDu) /* BCSCTL1 Calibration Data for 8MHz */
READ_ONLY DEFC( CALBC1_8MHZ , CALBC1_8MHZ_)

程序我也调用了:

DCOCTL = CALBC1_8MHZ; //设置DCO内部晶振
BCSCTL1 = CALDCO_8MHZ; //内部晶振校准,确定8MHz频率

但目前遇到的问题是我在Debug的时候发现CALBC1_8MHZ,CALDCO_8MHZ的值都是0xFF,查了一下资料发现是校正值被抹除,想请问一下我接下来该如何做?

  • 一般有以下几种解决办法

    1 通过外接晶体,用晶体配合timer校正DCO

    mspware内有对应的源代码,如下

    dev.ti.com/.../node


    2 Elprotronic新版MSP430下载工具带有DCO校正功能

    https://www.elprotronic.com/

    3 可以通过类似于MSP-Gang之类的工具,它具有校正DCO的功能选项
  • 使用了方法2,FET-430Pro下载工具,下载后提示DCO constants verification....... failed。
  • manual-flashpro430.pdf

    If the DCO calibration data are erased then the FlashPro430 software can recalibrate the DCO constants using access via JTAG, Spy-Bi-Wire or Fast BSL. No extra hardware is required. The DCO are calibrated with tolerance +/- 1% for desired frequency and the DCO constants are saved in the flash memory. See chapter 6 for details how to make the setup for the DCO recalibration.

    6.3 DCO constants verification

    The FlashPro430 can recalibrate the DCO constants, if the DCO constants are invalid. The “Apply DCO calibration....” should be selected in this case. The DCO calibration and DCO constant location are fixed regardless setup in the “DCO calibration” dialogue screen.