Fujitsu FR81S User Manual

Page of 2342
CHAPTER 51: TIMING PROTECTION UNIT 
 
 
5. Operation 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER : TIMING PROTECTION UNIT 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
25 
5.4.  Timer Operation 
The section explains the timer operation. 
Each timer is configured by 24-bit Up-counter. 
The timer has two operation modes of normal mode/overflow mode. The operation mode is controlled by 
the TPUTCN1n.TMOD bit. The operation mode becomes the normal mode when TPUTCN1n.TMOD=0, 
and becomes the overflow mode when TPUTCN1n.TMOD=1. 
 
 Normal Mode 
The timer operates as the up-counter when the normal mode. When the counter value is equal or larger than 
TPUTCN0n.ECPL [23:0], the interrupt flag (TPUTIR.IR[n] (n: the timer channel)) is set. An actual 
interrupt request is generated when TPUTIE.IE [n]=1. 
The timer starts counting from 0 by writing 1 to the TPUTCN0n.START bit. 
TPUTST.TS[n] is indicated while counting the timer by TPUTST.TS[n]=1. If the interrupt flag is set 
(TPUTIR.IR[n]=1), the count is stopped and becomes TPUTST.TS[n]=0. 
If 1 is written in the TPUTCN0n.STOP bit, the counter stops operating, and becomes TPUTST.TS[n]=0. 
The counter value at this time (When stopping) is maintained, and does not become 0. 
If 1 is written in the TPUTCN0n.CONT bit, the counter operation is restarted, and becomes 
TPUTST.TS[n]=1. 
 
 Overflow Mode 
When the overflow of the timer is detected in the overflow mode, the interrupt request flag (TPUTIR.IR[n]) 
is set. An actual interrupt request is generated when TPUTIE.IE[n]=1. 
Pre-load to the counter is possible in the overflow mode. The value of TPUTCN0n.ECPL[23:0] is pre-load 
and the count is started after it sets to TPUTCN1n.PL=1 and operation starts. The timer starts counting from 
0 if TPUTCN1n.PL=0. 
 
MB91520 Series
MN705-00010-1v0-E
2192