BAT32G1x9 user manual | Chapter 10 Timer M
396 / 1149
Rev.1.02
Table 10-17 Specifications for PWM3 mode
project
specification
Count the sources
f
CLK
, f
CLK
/2, f
CLK
/4, f
CLK
/8, f
CLK
/32
count
TM0 is an incremental count (TM1 is not used).
PWM waveform
PWM period:
1/fk
(m+1).
Effective level width for TMIOA0 output: 1/fk
(m
–n).
Effective level width for TMIOB0 output: 1/fk
(p
–q).
fk: The frequency at which the source is counted
m: The setting value of the TMGRA0 register
n: The setting value of the TMGRA1 register
p: The setting value of the TMGRB0 register
q: The setting value of the TMGRB1 register
m+1
n+1
p+1
q+1
TMIOA0 output
TMIOB0 output
p-q
m-n
(If the active level is "H")
Count start criteria
Write "1" (start counting) to the TSTART0 bit of the TMSTR register.
Count stop conditions
• Write "0" (stop count) to the TSTART0 bit when the CSEL0 bit of the TMSTR register is
"1".
The PWM output pin holds the output level before stopping the count.
• Stop counting when the CSEL0 bit of the TMSTR register is "0" and a comparison match
of TMGRA0 occurs.
The PWM output pins remain relatively matched after the output changes.
Timing of the generation of
interrupt requests
• Comparison matching (TMi registers and TMGRji registers have the same content).
• Overflow of TM0
TMIOA0 pin and
The function of
the
TMIOB0 pin
PWM output
TMIOC0, TMIOD0,
TMIOA1
~
TMIOD1
Pin function
I/O port
INTP0 pin function
The pulse output is the input of the forced cutoff signal (input dedicated port or INTP0
interrupt input).
Read timer
If you read the TM0 register, you can read the count value.
Write timer
Can write TM0 registers.
Select Features
•Input of the pulse output forced cutoff signal (see "Forced cutoff of 10.4.4 pulse output").
• Selection of effective levels for each pin
•Buffer run (see "10.4.2 buffer run").
Remark
i=0, 1,j=A, B, C, D