In LPC4357 – is it possible to generate RTC interrupt every second and once in 2 minutes generate RTC alarm interrupt (or once in a hour etc.) ?.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

In LPC4357 – is it possible to generate RTC interrupt every second and once in 2 minutes generate RTC alarm interrupt (or once in a hour etc.) ?.

587 Views
ssudhir
Contributor II

Hi,

We have configured the RTC to generate interrupt for every second. Set ALRM mask registers such that it generates alarm interrupt only when seconds match and set the seconds to 59 and it generates alarm interrupt for every 59 seconds. Now want to test generating alarm interrupt once in 2 minutes and changed the alarm mask register (0xfd) and set the alarm register for 2 minutes.  Now alarm interrupt occurs only once, while RTC interrupt occurs every second. Any idea?  

Thanks

0 Kudos
5 Replies

468 Views
ssudhir
Contributor II

We have configured RTC to generate interrupt every minute and set an alarm to some specific minute (minute only matching).  When alarm interrupt occurs, we clear the interrupt but during that minute (say at minute 5) alarm minute keeps occurring. However, when that minute passes everything is normal. Shouldn’t the alarm block generate interrupt only once a hour (minute matches alarm minute every hour)

Thanks

0 Kudos

468 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hello S, I hope you're doing well!

 

When the time changes from no match to match, the interrupt flag gets set, and  then it needs to be cleared by setting the correct ILR register bit.

If the program is getting interrupted constantly during that minute, then it's also possible you may have another interrupt configuration for your RTC that could be causing it.

 

For reference, could you please check out the LPCOpen RTC example provided in the MCUXpresso installation folder?

 

Best regards,

Sebastian

0 Kudos

468 Views
ssudhir
Contributor II

Got it

0 Kudos

468 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hello S, I hope you're doing well,

I was just wondering if you were able to solve your question or if you need any help with anything else.

Best regards,

Sebastian

0 Kudos

468 Views
ssudhir
Contributor II

Thank you Sebastian. We solved that problem.

0 Kudos