|
我的程序是: 仿真结果 IFG1 = 0x0E
void LFXT1CLK_Init(void)
{
unsigned int i;
BCSCTL1 |= XT2OFF;
BCSCTL1 &= ~XTS;
BCSCTL2 |= SELM0 + SELM1;
do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0xFFF; i > 0; i--) ; // Time for flag to set
P1OUT ^= 0x01;
}
while (IFG1 & OFIFG); // OSCFault flag still set?
IFG1 &= ~OFIFG;
} |
|