Hitachi SH7750 series Hardware Manual page 248

Superh risc engine
Hide thumbs Also See for SH7750 series:
Table of Contents

Advertisement

Yes
Yes
If a carry occurs while the time is being read, the correct time will not be obtained and the read
must be repeated. The procedure for reading the time without using interrupts is shown in (a), and
the procedure using carry interrupts in (b). The method without using interrupts is normally used
to keep the program simple.
Rev. 4.0, 04/00, page 236 of 850
Disable carry interrupts
Clear carry flag
Read counter register
Carry flag = 1?
No
(a) Reading time without using interrupts
Clear carry flag
Enable carry interrupts
Clear carry flag
Read counter register
Interrupt generated?
No
Disable carry interrupts
(b) Reading time using interrupts
Figure 11.3 Examples of Time Reading Procedures
Clear RCR1.CIE to 0
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Read RCR1 register and check CF bit
Set RCR1.CIE to 1
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Clear RCR1.CIE to 0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sh7750sSh7750

Table of Contents