- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why does the RTC data sheet caution "You should disable the component’s interrupts while calling functions that read or modify global variables."
A sentence or two of why this caution is mentioned in the RTC datasheet would seem to be appropriate. Datasheets for other components, such as the Interrupt component make no similar mention.
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Accessing data which might get changed by an interrupt should always be done with interrup disabled.
Since the access might not be atomic the interrupt might occur just within the data read, giving a time of 23:59 (before int) and a date of one day past (after the interrupt). You might use the CyEnterCriticalSection() and Cy_ExitCriticalSection() APIs (from System Reference Guide)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Accessing data which might get changed by an interrupt should always be done with interrup disabled.
Since the access might not be atomic the interrupt might occur just within the data read, giving a time of 23:59 (before int) and a date of one day past (after the interrupt). You might use the CyEnterCriticalSection() and Cy_ExitCriticalSection() APIs (from System Reference Guide)
Bob