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.

[参考译文] MSP430FR2311:HF 外部振荡器设置帮助

Guru**** 670100 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1158676/msp430fr2311-hf-external-oscillator-set-up-help

器件型号:MSP430FR2311

大家好、我正在尝试将 MSP430设置为使用外部4MHz 振荡器、但它似乎会导致故障、因为 CSCTL7上的标志 XT10FFG 设置为高电平。 这是我的设置代码、有人能告诉我我我发生了什么错误吗? 配置顺序等方面的文档不清楚。

我的器件上有振荡器馈入引脚2.7。

P2DIR = BIT4 | BIT6;//设置4输出。
   P2SEL0 = BIT1;
   P2SEL1 = BIT6 | BIT7;//在引脚上设置 X1模式


   CSCTL1 = DCORSEL_5;//将时钟设置为8MHz
   CSCTL4 = SELMS_2 | SELA_REFOCLK;
   CSCTL6 = XTS_1;//HF 模式晶振
   CSCTL7 &=~XT1OFFG;