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.

430g2553 时钟配置



BCSCTL1= CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;

这两句话是什么意思?能具体讲讲吗?为什么还需要配置DCOCTL

  • 楼主你好!

    这是设置DCO系统的R、C值,出厂前的校准数据存在flash里。直接使用即可。更多参考user guide

    SFR_8BIT(CALDCO_16MHZ); /* DCOCTL Calibration Data for 16MHz */
    SFR_8BIT(CALBC1_16MHZ); /* BCSCTL1 Calibration Data for 16MHz */
    SFR_8BIT(CALDCO_12MHZ); /* DCOCTL Calibration Data for 12MHz */
    SFR_8BIT(CALBC1_12MHZ); /* BCSCTL1 Calibration Data for 12MHz */
    SFR_8BIT(CALDCO_8MHZ); /* DCOCTL Calibration Data for 8MHz */
    SFR_8BIT(CALBC1_8MHZ); /* BCSCTL1 Calibration Data for 8MHz */
    SFR_8BIT(CALDCO_1MHZ); /* DCOCTL Calibration Data for 1MHz */
    SFR_8BIT(CALBC1_1MHZ); /* BCSCTL1 Calibration Data for 1MHz */

  • DCOCTL是配置什么的?每次用都需要配置BCSCTLx和DCOCTL 吗?

  • 设置 R 值,每次上电第一次需要设置。

    参考用户指南283页

    5.3.1 DCOCTL, DCO Control Register
    7 6 5 4 3 2 1 0
    DCOx MODx
    rw-0 rw-1 rw-1 rw-0 rw-0 rw-0 rw-0 rw-0
    DCOx Bits 7-5 DCO frequency select. These bits select which of the eight discrete DCO frequencies within the range
    defined by the RSELx setting is selected.
    MODx Bits 4-0 Modulator selection. These bits define how often the f DCO+1 frequency is used within a period of 32 DCOCLK
    cycles. During the remaining clock cycles (32-MOD) the f DCO frequency is used. Not useable when
    DCOx = 7.