inside my RTC interrupt routine, i'm individually handling RTC_CH0 and RTC_CH1 events as follows:
/* enter critical section */
if (AONRTCEventGet(AON_RTC_CH0)) {
/* process event */
AONRTCClearEvent(AON_RTC_CH0);
}
if (AONRTCEventGet(AON_RTC_CH1)) {
/* process event */
AONRTCClearEvent(AON_RTC_CH1);
}
/* leave critical section */
using a synthetic test, i'm able to force CH0 and CH1 to simultaneously trigger events.... in this case, i find that the act of clearing the CH0 event in fact clears the CH1 event as well!!!!
looking at the underlying AON_RTC_O_EVFLAGS registers, i find that its value is 0x101 upon entry to the interrupt routine -- signifying that CH0 and CH1 have events pending -- but then find that is value become 0x000 after the first AONRTCClearEvent(AON_RTC_CH0) call.... when i subsequently test for an event on CH1 by calling AONRTCEventGet, none is found....
to remove any doubt, i tried directly writing a 1 to the appropriate bit-band alias; i also tried various combinations of reading/writing the SYNC register.... i'm using the IAR compiler and have inspected the generated code; nothing suspicious here either....
question -- shouldn't i be able to atomically clear a single bit inside EVFLAGS??? perhaps there is a problem since the RTC registers reside in the AON domain???