English
Language : 

HD64F2149 Datasheet, PDF (441/1035 Pages) Renesas Technology Corp – Hitachi 16-Bit Single-Chip Microcomputer
14.5.6 OVF Flag Clear Condition
To clear OVF flag in WOVI handling routine, read TCSR when OVF=1, then write with 0 to
OVF, as stated above.
When WOVI is masked and OVF flag is poling, if contention between OVF flag set and TCSR
read is occurred, OVF=1 is read but OVF can not be cleared by writing with 0 to OVF.
In this case, reading TCSR when OVF=1 two times meet the requirements of OVF clear condition.
Please read TCSR when OVF=1 two times before writing with 0 to OVF.
LOOP
BTST.B
BEQ
MOV.B
MOV.W
MOV.W
#7,@TCSR
LOOP
@TCSR,R0L
#H'A521,R0
R0,@TCSR
; OVF flag read
; if OVF=1, exit from loop
; OVF=1 read again
; OVF flag clear
;:
407