EasyManuals Logo
Home>Renesas>Microcontrollers>RX Series

Renesas RX Series User Manual

Renesas RX Series
1823 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #795 background imageLoading...
Page #795 background image
R01UH0823EJ0100 Rev.1.00 Page 795 of 1823
Jul 31, 2019
RX23W Group 28. Realtime Clock (RTCe)
28.3.5 Reading 64-Hz Counter and Time
Figure 28.6 shows how to read the 64-Hz counter and time.
Figure 28.6 Reading Time
If a carry occurs while the 64-Hz counter and time are being read, the correct time will not be obtained, so they must be
read again. The procedure for reading the time without using interrupts is shown in (a) in
Figure 28.6, and the procedure
using carry interrupts in (b). To keep the program simple, method (a) should be used in most cases.
Read the counter
Disable a carry interrupt request on RTC side
Clear the interrupt status flag
Enable a carry interrupt request on RTC side
Clear the interrupt status flag
Read the counter
IR flag = 1?
Interrupt?
Enable a carry interrupt request on RTC side
Clear the interrupt status flag
Write 1 to the RCR1.CIE bit
Write 0 to the ICU.IRn.IR flag corresponding to
the CUP interrupt
(a) To read the time without using interrupt
Yes
(b) To read the time using interrupts
Write 1 to the RCR1.CIE bit
Write 0 to the RCR1.CIE bit*
1
Yes
No
Read the counter again when the IR flag
corresponding to the CUP interrupt is 1
Write 0 to the ICU.IRn.IR flag corresponding to
the CUP interrupt
Write 0 to the ICU.IRn.IR flag corresponding to
the CUP interrupt
Disable a carry interrupt request on ICU side
Write 0 to the ICU.IERm.IENj bit corresponding to
the CUP interrupt
Enable a carry interrupt request on ICU side
Write 1 to the ICU.IERm.IENj bit corresponding to
the CUP interrupt
No
Note 1. Disable the interrupt if necessary.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RX Series and is the answer not in the manual?

Renesas RX Series Specifications

General IconGeneral
BrandRenesas
ModelRX Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals