写的RTC中断,但是程序运行时不进入RTC的中断函数是怎么回事
下面是代码:请各位帮我看看是那出错了。我前面已经写IRQEnable()了。
PREINT = Fpclk/32768 -1;
PREFRAC = Fpclk - (Fpclk/32768)*32768;
ILR = 0x03;
CCR = 0x11;
CIIR = 0x02; // 设置秒值的增量产生一次中断
// 清除RTC增量和报警中断标志
VICIntSelect = 0x00;
VICVectCntl0 = 0x20|13;
VICVectAddr0 = (uint32)RTC_Count;
VICIntEnable = (1<<13);
void RTC_Count(void)
{
OffMinute++;
if(OffMinute==1) //can change to wahtever number you want
{
Power_Off();
OffMinute=0;
}
}
[解决办法]