在RTC中断函数中进入halt模式后周期性复位
INTERRUPT_HANDLER(RTC_IRQHandler,4)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
RTC->ISR2 = 0;
#if TIMEING_RST==TRUE
if(sys_config.pack_num==1) //单包时定时器喂狗
{
if(app_flags==0)
IDOG_Time++;
else
IDOG_Time=0;
if(IDOG_Time<=RST_Time) //t*1.5s
{
IWDG->KR = 0xAA;
}
else
WDT_RST();
if((RTC_Flag == 1)&&(app_flags==0))
{
halt();
}
}
#else
#endif
}
程序如上,RST_Time为2000, IDOG_Time加到29后出了中断就会复位,把halt()屏蔽掉就没问题,哪位大神帮忙分析下原因 |