BAT32G1x9 user manual | Chapter 7 Timer A
245 / 1149
Rev.1.02
7.4.2
Timer mode
This is the mode of counting down by selecting a count source from TCK0 to TCK2 bits of the TAMR0 register.
In timer mode, the count value is decremented by 1 whenever a count source is entered, and if the count value
becomes "0000H" and the next count source is entered, an underflow occurs, and an interrupt request is generated.
An example of the timer mode is shown in Figure 7-10.
Figure 7-10 An example of a timer mode
INTTMA interrupt
flag bit
TUNDF bit of
TACR0 register
Counter of TIMER A
counting source
reload register
reload counter
underflow
occurs
accept interrupt
request
set "0" via program
old value(0300H)
New value(1010H)