2023-04-11 07:47 PM
The alarm time set properly but interupt in half time &sometimes I not came,please share if any one have idea
2023-04-12 05:49 PM
Hello @PUnde.2 ,
Please share the code related to your RTC and alarm configuration using the code snippet tool.
Regards,
Ryan
2023-04-19 03:53 AM
{
RTC_AlarmTypeDef sAlarm = {0};
sAlarm.AlarmTime.Hours = Hours;
sAlarm.AlarmTime.Minutes = Minutes;
sAlarm.AlarmTime.Seconds = 30;
sAlarm.AlarmTime.SubSeconds = 0;
sAlarm.AlarmMask = RTC_ALARMMASK_DATEWEEKDAY;
sAlarm.AlarmSubSecondMask = RTC_ALARMSUBSECONDMASK_ALL;
sAlarm.AlarmDateWeekDaySel = RTC_ALARMDATEWEEKDAYSEL_DATE;
sAlarm.AlarmDateWeekDay = 1;
sAlarm.Alarm = RTC_ALARM_A;
if (HAL_RTC_SetAlarm_IT(&hrtc, &sAlarm, RTC_FORMAT_BIN) != HAL_OK)
{
Error_Handler();
}
}
This my code related to rtc alarm and i just take flag from interrupt. If I put the 30 sec as const value to rtc alarm it is working fine.