- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In datasheet of RTC I read this :
The component also has an optional alarm feature, which provides match detection for a second, minute, hour, day of week, day of month, month, and year. A mask selects what combination of time and date information will be used to generate the alarm. The alarm flexibility supports periodic alarms such as every twenty-third minute after the hour, or a single alarm such as 4:52 a.m. on September 28, 2043.
So my question is how assign RTC to trigger alarm for example every Sunday at 8.35 ?
Any example of code please !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have this example but in this code not exist ANY of string about how to set RTC to interrupt every Sunday at 8.35 for example.
Can you change it to implement this possibility ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just change the alarm time to that time!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the place to change as you want Sunday set that also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry I`m confused. For run RTC I need :
1. RTC_SetDateAndTime ...
2. RTC_SetAlarmMask((uint32) RTC_ALARM_HOUR_MASK | RTC_ALARM_MIN_MASK | RTC_ALARM_DAYOFWEEK_MASK);
3. RTC_SetAlarmHandler(AlarmerIsrHandler);
4. RTC_SetAlarmDateAndTime with first alarm Date and Time event.
And it`s enough to RTC work continuously for all next weeks ?
Or I need recalculate next alarm Date and set after trigger interrupt ?