BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
222 / 1149
Rev.1.02
Figure 6-71 Operation steps while the PWM function is performed (2/2).
Start operation
set TOEmp bit (slave) to '1' (only limit to restart operation).
Set TSmn bit)(master control) and TSmp bit(slave) of timer
channel start register m(TSm) both to '1'.
Because TSmnn bit and TSmp bit are trigger bits, thus
automatically return to '0'.
TEmn bit and TEmp bit both turns into '1'.
Master channel start counting and generate INTTMmn. Using this
trigger, slave channel also start counting.
in operation
forbidden modifying TMRmn register and TMRmp register and
TOMmn bit, TOMmp bit, TOLmn bit and TOLmp bit
configuration.
can mmodify TDRMn register and TDRmp register
configuration after master channel generates INTTMmn.
Can read TCRmn reigsrer and TCRmp register anytime.
can not use TSRmn register and TSRmp register.
master channel load TDRmn register value into Timer counting
register (TCRmn) and perform decremental counting. If TCRmn
counts till "0000H", then generating INTTMmn. At the same time,
load TDRmn register value into TCRmn register and restart
decremental counting.
Slave channel use INTTMmn of master channel as trigger, will load
TDRmp register value into TCRmp regiter and counter start
decremental counting. 1 counting clock cycle after master chanel
outputs INTTMmn, it sets T0mp otuput voltage to valid voltage level.
Then, if TCRmp count reaches "0000H", then set T0mp output
voltage set to invalid votlage levle then stoop counting. Thereafter,
the process repeats.
set TTmn bit (master) and TTmp bit(slave) to '1'.
Because TTmn bit and TTmp bit are trigger bits, thus
automatically return to '0'.
TEmn bit and Temp bit turn into '0' and stop counting.
TCRmn register and TCRmp register hold counted value and stop
counting.
T0mp output not initialized and remains unchanged.
set TOEmp bit of slave channel to '0', and configure TOmp
bit.
T0mp pin output T0mp configured voltage level.
Scenarios to maintain T0mp pin output voltage:
set T0mp bit to '0' after set hold value to port register
configuration.
In case T0mp pin output voltage does not need to be held: no
configuration requried
maintain T0mp pin output voltage via Port function.
set TM4mEN bit of peripheral enable register 0 (PER0) to '1'
Timer Unit m input clock is not been provided.Perform initialization to
all circuit and SFR of all channels.
(T0mp bit turns into '0' and T0mp pin becomes port function)
(TO00 bit turns into '0' and TO00 pin becomes port function)
stop operation
timer 4 stop
re
s
ta
rt
o
p
e
ra
tio
n
Note: m: Unit number (m=0,1) n: Master channel number (n=0,
2, 4, 6).
p: Slave channel number (m=0Time:n
<
p≤3
,
m=1Time:n
<
p≤7)