RL78/G13 Safety Function (Frequency Detection)
5.8.25 Starting Real-Time Clock Fixed-Frequency Interrupt
Figure 5.28 shows the flowchart for starting real-time clock fixed-frequency interrupts.
R_RTC_Set_
ConstPeriodInterruptOn
return(status)
Set return value to indicate
normality
Return value: status
[Argument]
enum RTCINTPeriod period:
Occurrence frequency of fixed-frequency interrupts
Ye s
No
Argument
abnormal?
Set return value to indicate
abnormality
Disable fixed-frequency interrupts
RTCMK bit 1
Clear fixed-frequency interrupt request
flag
RTCIF bit 0
Set occurrence frequency of
fixed-frequency interrupts
RTCC0 registe
CT2 to CT0 bits peripd
Clear fixed-frequency interrupt status
flag
RTCC1 registe
RIFG bit 0
Enable fixed-frequency interrupts
RTCMK bit 0
status: Judgment results indicating that
argument is normal/abnormal
Figure 5.28 Starting Real-Time Clock Fixed-Frequency Interrupt
R01AN0956EJ0100 Rev. 1.00 Page 56 of 70
Feb. 27, 2012