BAT32G1x9 user manual | Chapter 6 Universal timer unit Timer4/8
167 / 1149
Rev.1.02
6.4 The basic rules of the universal timer unit
6.4.1
The basic rules of the multi-channel linkage operation function
The multi-channel linkage operation function is a function that combines the master channel (the reference
timer that mainly counts the cycles) and the slave channel (the timer that follows the operation of the master
channel), and several rules need to be observed when using it.
The basic rules of the multi-channel linkage operation function are as follows.
1)
Only an even number of channels (channel 0, channel 2) can be set as the main control channel.
2)
Any channel other than channel 0 can be set as a slave channel.
3)
Only the low-level channel of the master channel can be set as a slave channel.
For example, when channel 0 is set to the main control channel, the channel (channel 1, channel 2,
channel 3) that starts with channel 1 can be set as the slave channel.
4)
Multiple slave channels can be set for one master channel.
5)
When using multiple master channels, you cannot set a slave channel that spans the master channel.
For example, when channel 0 and channel 2 are set to the main control channel, channel 1 can be set to
the slave channel of the main control channel 0, but channel 3 cannot be set to the slave channel of the
main control channel 0.
6)
The slave channel linked to the master channel needs to set the same operating clock. Bits 15 and bit14 of
the slave channels linked to the master channel are CKSmn0 bits and CKSmn1 bits (timer mode register
mn(TMRmn).") values need to be the same setpoint.
7)
The master channel can pass intTMmn (interrupt), start software trigger, and count clock to the low
channel.
8)
Slave channels can use the master channel's INTMmn (interrupt), start software trigger, and count clock
as the source clock, but cannot pass their own INTMmn (interrupt), start software trigger, and count clock
to the low channel.
9)
The master channel cannot use the INTMmn (interrupt), start software trigger, and count clocks of other
high-level master channels as the source clock.
10) In order to start the channel to be linked at the same time, the channel start trigger bit (TSmn) of the
linkage channel needs to be set at the same time.
11) Only all channels of the linkage or the master channel can use the setting of the TSmn bit in the counting
operation. You cannot use only the setting of the TSmn bit of the slave channel.
12) In order to stop the channel to be linked at the same time, the channel stop trigger bit (TTmn) of the
linkage channel needs to be set at the same time.
13) In interlink operation, because the master channel and the slave channel need the same operating clock,
CKm2/CKm3 cannot be selected.
14) The timer mode register m0 (TMRm0) is fixed to "0" without a master bit. However, because channel 0 is
the highest level channel, channel 0 can be used as the master channel when the linkage is running.
The basic rules of the multi-channel linkage operation function are the rules applicable to the channel group
(forming a collection of master channels and subordinate channels of the multi-channel linkage operation function).
If you set 2 or more channel groups that are not linked to each other, the above basic rules do not apply to the
channel groups.
Note: m: unit number (m=0,1)n: channel number (when m=0: n=0~3, m=1: n=0~7).