2011/4/7 Oliver Seitz <[email protected]> > > >I mean that I couldn't find something in the datasheet (thus in device > file) I could read in order to know if alarm is currently ringing. Adding a > function for this just means you've found this ! If so, I'd be happy to hear > ! > > I did find it... It is the ALRMCFG_ALRMEN alarm enable bit that is cleared > when the last alarm (ALRMRPT=0 and CHIME=0) is issued. >
I did too but this isn't really handy: if no repeat, you need to track is you enabled the alarm (ALRMEN = true) and then detect changes. And what if CHIME = 1 ? > > Apart from this, there is the PIR3_RTCCIF bit (which is called RTCCCIF > once...), which must be the one you were looking for. Indeed, the datasheet > does not mention it when talkind about RTC, but the register description for > PIR3 says: > > bit 0 RTCCIF: RTCC Interrupt Flag bit > 1 = An RTCC interrupt occurred (must be cleared in software) > 0 = No RTCC interrupt occurred > It seems this interrupt is triggered for other events than just alarm... (related to timer1 ?). So indeed in my ISR, I check this, and then check if ALRMRPT != orginal_value (and until 0 -- or until ALRMEN == false). Cheers, Seb -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
