RTC on K64FX512M12 and 1sec ISR

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

RTC on K64FX512M12 and 1sec ISR

900 次查看
neilporven
Senior Contributor I

Hi everyone,

So after looking at the RTC on the (K64 Sub-Family Reference Manual).  I find that RTC doesn't have time and date,

instead there is a 32-bit seconds counter with roll-over protection.  The RTC has a 1sec ISR, that I believe that it is

always going after it has been activated in software.  I some questions:

1.  What is "with roll-over protection"?

2.  Is it possible to write to the 32-bit second counter register?

3.  When a power down situation occurs is there a flag that is set to detect it?

4.  When power is restore is there a flag that is set to detect it?

Thank you.

0 项奖励
回复
1 回复

717 次查看
mjbcswitzerland
Specialist V

Neil

1. I don't think that roll-over-protection is a theme since it will roll-over only in about 2109 (which is the same issue that UTC generally has).

2. Yes, the counter can be written to at any time by the processor in supervisor mode.

3. The K64 has battery backup for the clock domain. When the processor has been power cycled this can be detected in the reset status register.

4. If the VBAT domain is power cycled the RTC has a flag to show that it hasn't been configured so that the configuration can be performed.

See the following for more details

http://www.utasker.com/docs/uTasker/uTasker_Time.pdf

In the uTakser project there is a complete Gregorian calendar time/date implementation for the K64, including SNTP for synchronising to a time server.

It also has low leakage support for using the RTC time as wake up support.

Regards

Mark

Kinetis: µTasker Kinetis support

K64: µTasker Kinetis FRDM-K64F support  / µTasker Kinetis TWR-K64F120M support  / µTasker Kinetis TWR-K65F180M support

RTC/Time Management: http://www.utasker.com/docs/uTasker/uTasker_Time.pdf

For the complete "out-of-the-box" Kinetis experience and faster time to market