r5s77631ay266bgv Renesas Electronics Corporation., r5s77631ay266bgv Datasheet - Page 846

no-image

r5s77631ay266bgv

Manufacturer Part Number
r5s77631ay266bgv
Description
Renesas 32-bit Risc Microcomputer Superhtm Risc Engine Family Sh-4a Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
Section 22 Realtime Clock (RTC)
22.5.3
The use of the alarm function is illustrated in figure 22.4.
An alarm can be generated by the second, minute, hour, day-of-week, day, month, or year value,
or a combination of these. Write 1 to the ENB bit in the alarm registers involved in the alarm
setting, and set the alarm time in the lower bits. Write 0 to the ENB bit in registers not involved in
the alarm setting.
When the counter and the alarm time match, RCR1.AF is set to 1. Alarm detection can be
confirmed by reading this bit, but normally an interrupt is used. If 1 has been written to
RCR1.AIE, an alarm interrupt is generated in the event of alarm, enabling the alarm to be
detected.
Rev. 1.00 Oct. 01, 2007 Page 780 of 1956
REJ09B0256-0100
Alarm Function
(Wait for interrupt or check alarm flag)
Disable alarm interrupts
Enable alarm interrupts
Monitor alarm time
Clear alarm flag
Set alarm time
Figure 22.4 Example of Use of Alarm Function
Clock running
Clear RCR1.AIE to prevent erroneous interrupts.
Be sure to reset the flag as it may have been
set during alarm time setting.
Set RCR1.AIE to 1.

Related parts for r5s77631ay266bgv