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.

MSP430F2618使用外部8M晶振无发工作

Other Parts Discussed in Thread: MSP430F2618

MSP430F2618使用外部8M晶振接53管脚XT2IN,但代码陷入DO WHILE循环里,无法继续运行。代码如下,请各位专家帮忙看看,谢谢。

//------选择系统主时钟为8MHz-------
BCSCTL1 &= ~XT2OFF; //打开XT2高频晶体振荡器0110
BCSCTL3 |= XT2S_3; // XT2数字时钟输入模式

unsigned int i;
do
{
IFG1 &= ~OFIFG; //清除晶振失败标志
for (i = 0x1FF; i > 0; i--); //等待8MHz晶体起振
}
while ((IFG1 & OFIFG)); //晶振失效标志仍然存在?

BCSCTL2 |= SELM_2 + SELS; //MCLK和SMCLK选择高频晶振