BAT32G1x9 user manual | Chapter 10 Timer M
392 / 1149
Rev.1.02
Table 10-16 Specifications for Complementary PWM Modes
project
specification
Count the sources
f
CLK
, f
CLK
/2, f
CLK
/4, f
CLK
/8, f
CLK
/32
An external input signal from the TMCLK pin that can
programmatically select valid edges
The same values must be set for
the
TCK0~TCK2 bits of the TKG0 register and the
TCK0~TCK2
bits
of the TMCR1 register (same count source).
count
Increment the count or decrement the count
If the TM0 register and TMGRA0 registers match during the process of increasing the count,
both TM0 and TM1 become decrementing counts; If the TM1 register changes from "0000H"
to "FFFFH" during the decrement of the count, both TM0 and TM1 become incrementing
counts.
PWM waveform
PWM cycle: 1/fk
(m+2
–p) 2 note1
Dead time: p
Normal phase effective level width: 1/fk
(m
–n–p+1) 2
Inverting effective level width: 1/fk
(n+1
–p) 2
fk: The frequency at which the source is counted
m: The setting value of the TMGRA0 register
n: The setting value of the TMGRB0 register (PWM output 1).
The setting value of the TMGRA1 register (PWM output 2).
The set value of the TMGRB1 register (PWM output 3).
p: The setting value of the TM0 register
m+2
–p
n+1
Positive phase
Inverted
n+1
–ppm–p–n+1
(when the effective level is "L").
Count start criteria
Write "1" (start counting) to the TSTART0 bits and TSTART1 bits of the TMSTR register.
Count stop conditions
When the CSEL0 bit of the TMSTR register is "1", write "0" (stop count) to the TSTART0 bit
and TSTART1 bit
(The PWM output pin outputs the initial output level of the OLS0 bit and OLS1 bit selection
of the TMFCR registers.
Timing of the generation of
interrupt requests
• Comparison matching (TMi registers and TMGRji registers have the same content).
• Underflow of TM1
TMIOA0 pin function
I/O port or TMCLK (external clock) input
TMIOB0 pin function
The positive phase output pin of PWM output 1
TMIOD0 pin function
Inverting output pin of PWM output 1
TMIOA1 pin function
The positive phase output pin of PWM output 2
TMIOC1 pin function
The inverting output pin of PWM output 2
TMIOB1 pin function
The positive phase output pin of PWM output 3
TMIOD1 pin function
Inverting output pin of PWM output 3
TMIOC0 pin function
Inverting output at every 1/2
PWM
cycle.
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 TMi
register, you can read the count value.
Write timer
Can write TMi
registers.
Select Features
•Input of the pulse output forced cutoff signal (see
"Forced cutoff of 10.4.4 pulse output").
• Selection of positive and negative phase effective levels and initial output levels
• Selection of transfer timing of buffer registers
Note 1
After starting counting, the
PWM
cycle is fixed.
Remark i=0, 1,j=A, B, C, D