BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
181 / 1149
Rev.1.02
6.6.3
Considerations for channel output operation
1)
About the configuration changes of the TOm, TOEm, TOLm, and TOMm registers in the operation of the
timer
The operation of the timer (the operation of the timer count register mn (TCRmn) and the timer data register mn
(TDRmn)) and the TOmn output circuit are independent of each other. Thus, the timer output register m (TOm), the
timer output enable register m (TOEm), and the timer output level register m ( TOLm) setpoint change does not affect
the operation of the timer, you can change the setpoint during the timer operation. However, in order to output the
expected waveform from the TOmn pin during the operation of each timer, it must be set to the value of the register
setting content example for each run shown in 6.8 and 6.9.
If you change the setpoint of the TOEm registers and TOLm registers other than the TOm registers before and after
generating the timer interrupt (INTTMmn) signal for each channel, it is based on whether the timer interrupt (INTTMmn)
is generated Whether the signal changes before or after generation, the waveform output of the TOmn pin may be
different.
Remarks: m: Unit number (m=0,1)n: Channel number (when m=0: n=0~3, m=1: n=0~7).
(2) The initial level of the TOmn pin and the output level after the timer starts running
Write the timer output register m (TOm) before allowing the port output and in the state where the timer output
(TOEmn=0) is disabled, and when the timer output Enabled state (TOEmn=1) is set after changing the initial level
The TOmn pin output level changes as follows.
(a) When the operation starts in the main control channel output mode (TOMmn=0).
In the master channel output mode (TOMmn=0), the timer output level register m(TOLm) is set invalidally. If the
timer operation begins after the initial level is set, the output level of the TOmn pin is inverted by generating an
alternating signal.
Figure 6-33 TOmn pin when alternating outputs (TOMmn=0) is 33
Tomn
(output)
initial
state
enable port
output
swap
swap
swap
swap
swap
(initial State: low voltage
level)
(initial State: high
voltage level)
(initial State: low voltage
level)
(initial State: high
voltage level)
(valid high voltage level)
(valid low voltage level)
bold line: valid voltage level
Remarks: 1
Alternate: The
output state of the inverting
TOmn
pin.
2.m: unit number (m=0,1)n: channel number (m=0: n=0~3, m=1: n=0~7).
(b) When running in slave channel output mode (TOMmn=1) (PWM output).
In slave channel output mode (TOMmn=1), the effective level depends on the setting of the timer output
level register m (TOLmn).
Figure 6-34 TOmn pin at PWM output (TOMmn=1).