Every (CIR+1)second apply (32768-tcr):
![RTC_TCR[TCR].png RTC_TCR[TCR].png](/t5/image/serverpage/image-id/2303iF3093EFD1EB9C736/image-size/large?v=v2&px=999)
For example:
32768 - 32769.846 = tcr / (CIR + 1)
I get:
tcr = -46 = 0xD2
CIR = 24
In the RTC_TCR register should I set TCR = 0xD2?
Yes
if every (CIR+1)second apply (32768-tcr)
if every (25)second apply (32814)
[32768*(CIR+1)-(tcr)]/32769.846Hz=[32768*(25)-(-46)]/32769.846Hz=24.999995422621149943762323448209sec
if not apply:
[32768*(25)]/32769.846Hz=24.998591693107132697541514232322sec
Another example:
32768 - 32767.123 = tcr / (CIR + 1)
I get:
tcr = 110 = 0x6E
CIR = 124
In the RTC_TCR register should I set TCR = 0x6E?
Yes
if every (CIR+1)second apply (32768-tcr)
if every (125)second apply (32668):
[32768*(CIR+1)-(tcr)]/32767.123Hz=[32768*(125)-(100)]/32767.123Hz=125.00029373955107380040658436812sec
if not apply:
[32768*(125)]/32767.123Hz=125.00334557904274964878668169921sec
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------