English
Language : 

M16C30P_07 Datasheet, PDF (292/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
22. Usage Precaution
22.8 Precautions for Timers
22.8.1 Timer A
22.8.1.1 Timer A (Timer Mode)
The timer remains idle after reset. Set the mode, count source, counter value, etc. using the TAiMR (i = 0 to 2)
register and the TAi register before setting the TAiS bit in the TABSR register to “1” (count starts).
Always make sure the TAiMR register is modified while the TAiS bit remains “0” (count stops) regardless
whether after reset or not.
While counting is in progress, the counter value can be read out at any time by reading the TAi register.
However, if the counter is read at the same time it is reloaded, the value “FFFFh” is read.
Also, if the counter is read before it starts counting after a value is set in the TAi register while not counting, the
set value is read.
22.8.1.2 Timer A (Event Counter Mode)
The timer remains idle after reset. Set the mode, count source, counter value, etc. using the TAiMR (i = 0 to 2)
register, the TAi register, the UDF register, the ONSF register TAZIE, TA0TGL and TA0TGH bits and the
TRGSR register before setting the TAiS bit in the TABSR register to “1” (count starts).
Always make sure the TAiMR register, the UDF register, the TAZIE, TA0TGL and TA0TGH bits in the ONSF
register and the TRGSR register are modified while the TAiS bit remains “0” (count stops) regardless whether
after reset or not.
While counting is in progress, the counter value can be read out at any time by reading the TAi register.
However, “FFFFh” can be read in underflow, while reloading, and “0000h” in overflow. When setting TAi
register to a value during a counter stop, the setting value can be read before a counter starts counting. Also, if
the counter is read before it starts counting after a value is set in the TAi register while not counting, the set
value is read.
Rev.1.22 Mar 29, 2007 Page 276 of 291
REJ09B0179-0122