Fujitsu FR60 Computer Hardware User Manual


  Open as PDF
of 1038
 
743
Chapter 35 Free-Run Timer
7.Q & A
7.4 How do I clear the free-run timer?
You can clear the free-run timer by performing the following operations:
Set with clear bit (TCCS.CLR).
How to clear the free-run timer when the free-run timer value and the compare-register value match
Set with the timer initialization condition bit (TCCS.MODE).
The setting of the output compare is also required. (See “Chapter 37 Output Compare (Page No.759)”.)
Reset.
When you reset (the INIT pin input, the watchdog reset, the software reset), the free-run timer is cleared.
Write “0000
H
” while the free-run timer is stopped.
The count value will be set to “0000
H
”, when “0000
H
” is written while the free-run timer is stopped.
With the overflow of the free-run timer, the count value returns to “0000
H
”.
7.5 What interrupt registers are used?
Setting of the free-run timer interrupt vector and the free-run timer interrupt level
The relationship among the free-run timer number, interrupt levels and vectors is shown in the table below.
See “Chapter 24 Interrupt Control (Page No.311)” about the details of interrupt levels and interrupt vectors.
Since the interrupt request flag (TCCS.IVF) is not cleared automatically, make sure to clear it with software
before returning from the interrupt process. (Write “0” in the IVF bit)
7.6 Interrupt Types
There is only one type of interrupt, and it is generated at the overflow of the free-run timer. (Selection is not
required)
7.7 How do I enable interrupts?
Enable interrupt requests, interrupt request flag
Operation Clear bit (CLR)
To clear the free-run timer Write “1”
Operation Timer initialization condition bit (MODE)
To clear the free-run timer at the compare-match Set to “1”
Number Interrupt Vectors (default) Interrupt level setting bits (ICR[4:0])
Free-run Timer 0
#40
Address: 0FFF5Ch
Interrupt level register (ICR12)
Address: 0044Ch
Free-run Timer 1
#41
Address: 0FFF58h
Free-run Timer 2
#42
Address: 0FFF54h
Interrupt level register (ICR13)
Address: 0044Dh
Free-run Timer 3
#43
Address: 0FFF50h
Free-run Timer 4
#44
Address: 0FFF4Ch
Interrupt level register (ICR14)
Address: 0044Eh
Free-run Timer 5
#45
Address: 0FFF48h
Free-run Timer 6
#46
Address: 0FFF44h
Interrupt level register (ICR15)
Address: 0044Fh
Free-run Timer 7
#47
Address: 0FFF40h