2007-10-03 03:24 AM
RTC ALarm Interrupt
2011-05-17 03:16 AM
Hi everyone,
I am two problem with RTC. For RTC Alarm interrup, i must write my program in RTC_IRQHandler but for RTC alarm. When I'm in debug mode, the flag ALRIE and ALRF is set when a interrupt occur but the program go in RTC_IRQHandler; void RTC_IRQHandler(void){ if(RTC_GetITStatus(RTC_IT_SEC) != RESET){ RTC_ClearITPendingBit(RTC_IT_SEC); TimeDisplay = 1; RTC_WaitForLastTask(); SystemDateTime.seconde++; if(RTC_GetITStatus(RTC_IT_ALR) != RESET){ RTC_ClearITPendingBit(RTC_IT_ALR); RTC_WaitForLastTask(); RTC_SetAlarm(RTC_GetDateTime()+10);//Actual Time + 10sec RTC_WaitForLastTask(); AlarmDisplay=1; } } The second probleme is when I run the programme, alarm interrupt do action but no always 10-11s