Timing with RTC alarm

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

Timing with RTC alarm

Jump to solution
722 Views
PO220
Contributor IV

Hi

I use RTC alarm to interrupt at specific seconds

I have problems that look like a 1s delay... Is interrupt set at the END of the second that match with alarm register ?

I'm not sure what I read in datasheet :

When the time counter is enabled, the SR[TAF] is set whenever the TAR[TAR] equals the TSR[TSR] and
the TSR[TSR] increments.

TAR = TSR and then interruption + TSR increments  (not 1 second delay with alarm register)

or TAR = TSR  and then TSR increments and then interruption ? (1 second delay after alarm register match)

Thank you in advance

PS : I'm using a K64

0 Kudos
1 Solution
590 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

According to the reference manual, the equation below is correct.

TAR = TSR and then TSR increments and then interruption

Hope it helps.

Have a great day,
Ping

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
591 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

According to the reference manual, the equation below is correct.

TAR = TSR and then TSR increments and then interruption

Hope it helps.

Have a great day,
Ping

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

590 Views
PO220
Contributor IV

tanks for confirmation.

I would have naturally done the other solution (any delay with registers equality) ; your confirmation not only confirms reference manual, but also confirms tests : I am therefore not crazy !

Thanks

0 Kudos