BAT32G1x9 user manual | Chapter 9 Timer C
312 / 1149
Rev.1.02
9.5 Precautions when using Timer C
9.5.1
Read and write registers
To set the timer C, you must first place the TMCEN position "1" of P ER1. When the TMCEN bit is "0", the write
operation of the control register of timer C is ignored, and the read values are the initial values.
When the clock stops, registers other than TCBUF cannot be written except for T C, which cannot be written.
Note The following registers in the count action cannot be overwritten.
⚫
TCCR1
⚫
TCCR2
9.5.2
Overflow interruption
When the count value of Timer C is FFFFH, an overflow interrupt does not occur if the trigger event of the
external input before the overflow reaches 0 000H resets the counter.
9.5.3
Input capture and timer C count reset action
Even if you set up TCSR. TCSB = 0 (count stop), timer M and CMP1 input signals can still trigger Timer C input
capture motion and count reset action.
9.5.4
Timer C and Timer M, comparator 1 are linked
When timer C and timer M, comparator 1 are linked, the setup steps are as follows:
1. Provides a clock input for comparator 1: PGACMPEN=1
2. Enable Comparator 1 interrupt generation and output: See Chapter 17 Comparator CMP for details.
3. Clock input for timer C is provided: TMCEN=1
4. Set up TCCR1
5. Set up TCCR2
6. Set the timer M, and the timer M count starts: TMOEN=1
7. Timer C count start: TCCR2. START=1
Note 1: When Timer C is linked to Timer M and CMP1, the action clock of Timer C must be set to match the
action clock frequency of Timer M.
Note 2: When setting the register, you must first set the control register TCCR1 and then set the TCCR2. TSTART