Timing with RTC alarm

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Timing with RTC alarm

跳至解决方案
1,373 次查看
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 项奖励
回复
1 解答
1,241 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
1,242 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

1,241 次查看
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 项奖励
回复