![Wiznet W7500 Reference Manual Download Page 308](http://html.mh-extra.com/html/wiznet/w7500/w7500_reference-manual_990600308.webp)
W7500x Reference Manual Version1.1.0
308 / 399
Figure 42. RTC block diagram
RTC clock
RTC Clock (RTCCLK) can be selected among several clocks (32768Hz oscillator, MCLK,
RCLK, OCLK). Please refer to the Clock Reset Generator chapter for configuring the clock.
If the 32768Hz oscillator clock is used, the divider generates 1 Hz clock internally.
If the DIVRST (Bit[1] of RTC Control Register ) value is high, the RTC Divider is cleared. If
the DIVRST value is low, the divider operates.
RTC interrupt
RTC has two kinds of interrupt source, Counter Interrupt and Alarm Interrupt.
Interrupts are enabled in the NVIC using the appropriate Interrupt Set Enable register.
There are following Counter Interrupts: Second, Minute, Hour, Day (Day of Week), Date
(Day of Month) and Year.
Each bit of RTCINTM (Interrupt Mask Register) can disable or enable interrupt for each
Counter Interrupt.
Alarm Interrupt can be generated when the Alarm matches with Counter.
RTC Counter and Calendar
When user writes 1 to bit 0 of control register, then the RTC counter runs according to
the RTC Clock.
Timer value should be written as the BCD format.
The RTC counter operates for Calendar function including Day, Month, Year and Leap Year
calculation.
RTC BCD Counter
Divider
DIVRST
1Hz Clock
BCD
Consolidated
BCD
PreBCD
=
Alarm
Interrupt
Counter
Increment
RTC
interrupt
INTEN
...
...
RTCCLK
Match
Counter
Interrupt
Counter
Interrupt
Pending
Alarm
Interrupt
Pending
clear
clear