Timing with RTC alarm

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Timing with RTC alarm

ソリューションへジャンプ
1,389件の閲覧回数
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,257件の閲覧回数
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,258件の閲覧回数
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,257件の閲覧回数
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 件の賞賛
返信