Chapter 18 Real-Time Counter With Calendar (RTCV2)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
650
Freescale Semiconductor
The second counter rolls over to 0 after reaching 23.
18.5
Functional Description
The RTC module support calendar functions. It includes a main 16-bit up-counter with a
16-bit modulo
register. The module also contains software selectable interrupt logic and clock output for compensation
calibration.
The RTC module provides clock indications in seconds, minutes, hours. Reading the calendar registers
return the current time. Writing to these registers set the time, and the counters will continue to count from
the new settings.
18.5.1
RTC clock and reset behavior
Depending on the use case, the RTC clock can derived from OSCCLK or OSCCLK_32K. After power on
reset, the RTC clock is derived from OSCCLK. User should set the RTCPS and CLKSRC value before
enabling the RTCEN. If RTCCLK is from OSCCLK, the RTCPS value should be set to meet that the
prescaler clock frequency will be 1MHz. The 1MHz clock will follow by a 1/32 divider to generate a
31.25KHz clock, which will be used as RTC counter clock(RTCCNT clock input). In case the clock source
is OSCCLK, after reset, the main OSC will be disabled and must be enabled by setting the OSCE in CPMU
as soon as possible in order to have clock available for the RTC. If clock source is OSCCLK_32K,
software must wait the OSC startup time after power on reset before enabling the RTC. If 32K OSC is
enabled, it will be always on until a power on reset happens.
18.5.2 Calendar Functions
Calendar functions are provided by the second, minute and hour count registers. The second, minute and
hour counters are able to generate interrupts on every count increment, providing periodic interrupts for
the second (RTCSECF), minute (RTCMINF) and hour (RTCHRF). A CPU interrupt request is generated
if the corresponding enable bit (SECIE, MINIE and HRIE) is also set.
18.5.3 Interrupts
In addition to the second, minute and hour periodic interrupts generated by the clock functions, the
7
6
5
4
3
2
1
0
R
0
0
0
HR4
HR3
HR2
HR1
HR0
W
POR:
0
0
0
0
0
0
0
0
Figure 18-12. Hour Register (HRR)
Table 18-13. HRR Field Descriptions
Field
Description
4:0
HR4~HR0
Hour Counter Value
— These read/write bits contains the current value of the hour. 0 to 23 is valid.Wirting the
value other than 0 to 23 has no effect.
Содержание MC9S12ZVHL32
Страница 21: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 21 PAGE INTENTIONALLY LEFT BLANK...
Страница 22: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 22 Freescale Semiconductor PAGE INTENTIONALLY LEFT BLANK...
Страница 686: ...Chapter 20 ECC Generation module SRAM_ECCV1 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 686 Freescale Semiconductor...
Страница 752: ...Chapter 22 Supply Voltage Sensor BATSV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 752 Freescale Semiconductor...
Страница 774: ...Chapter 23 LIN Physical Layer S12LINPHYV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 774 Freescale Semiconductor...
Страница 788: ...Appendix A MCU Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 788 Freescale Semiconductor...
Страница 794: ...Appendix B ADC Electricals S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 794 Freescale Semiconductor...
Страница 798: ...Appendix D IRC Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 798 Freescale Semiconductor...
Страница 802: ...Appendix F MSCAN Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 802 Freescale Semiconductor...
Страница 806: ...Appendix G NVM Electrical Parameters S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 806 Freescale Semiconductor...
Страница 810: ...Appendix H BATS Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 810 Freescale Semiconductor...
Страница 816: ...Appendix K OSC32K Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 816 Freescale Semiconductor...
Страница 822: ...Appendix L SPI Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 822 Freescale Semiconductor...
Страница 826: ...Appendix M LINPHY Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 826 Freescale Semiconductor...
Страница 829: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 830 Freescale Semiconductor O 1 144 LQFP...
Страница 830: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 831...
Страница 831: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 832 Freescale Semiconductor...
Страница 832: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 833 O 2 100 LQFP...
Страница 833: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 834 Freescale Semiconductor...
Страница 834: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 835...
Страница 835: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 836 Freescale Semiconductor...