Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

BASIC TIMER中断不知道什么原因进不去

$
0
0

上电后,ACLK默认外部低速晶振,匹配电容选的是10pF,单片机选用的是MSP430F4152,IAR使用的是5.30的。

会不会和头文件有关?

这是程序

u8 i;
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer to prevent time out reset
FLL_CTL0 |=XCAP11PF; //设置匹配电容为12Pf

do
{
IFG1 &= ~OFIFG; // Clear OSCFault flag
for (i = 0x47FF; i > 0; i--); // Time for flag to set
}
while (IFG1 & OFIFG); // OSCFault flag still set?

//开basictime中断
//Init_Clk();
Init_Port();
InitState();
Init_Lcd();

BTCTL |= BT_ADLY_16;//+ BT_fLCD_512; //设置basictimer 8ms中断,LCD的刷新频率为512HZ
IE2 |= BTIE;
__bis_SR_register(GIE);
while (1) // repeat forever
{
DisBlcd();

}

}


Viewing all articles
Browse latest Browse all 3634

Trending Articles