CMS32L051 User Manual |Chapter 5 Universal Timer Unit (Timer4)
www.mcu.com.cn 141 / 703
5.4 Basic rules of the universal timer unit
5.4.1 Basic rules of the multi-channel linkage operation function
The multi-channel linkage operation function is a combination of the master channel (the reference timer
that mainly counts cycles) and the slave channel (the timer that obeys the operation of the master channel),
and several rules need to be observed when used.
The basic rules of the multi-channel linkage operation function are as follows.
1) Only even channels (channel 0, channel 2) can be set as the main 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 as the main control channel, the channel (channel 1, channel 2,
channel 3) starting from channel 1 can be set as a subordinate channel.
4) Multiple slave channels can be set for one master channel.
5) When using multiple master channels, you cannot set slave channels that span the master channel.
For example, when channel 0 and channel 2 are set as the main control channel, channel 1 can be
set as the subordinate channel of the main control channel 0, and channel 3 cannot be set as the
subordinate channel of the main control channel 0.
6) The slave channels linked to the master channel need to set the same operating clock. CKSmn0 bits
and CKSmn1 bits of the slave channel linked to the master channel (bit15 and bit14 of the timer mode
register mn (TMRmn). ) value needs to be the same set value.
7) The master channel passes INTTMmn (interrupt), start software trigger, and count clock to the low
channel.
8) The slave channel can use the INTTMmn (interrupt), start software trigger, and count clock of the
master channel as the source clock, but cannot pass its own INTTMmn (interrupt), start software
trigger, and count clock to the low-level channel.
9) The master channel cannot use the INTTMmn (interrupt), start software trigger, and count clocks of
other high master channels as source clocks.
10) In order to start the channel to be linked at the same time, it is necessary to set the channel start
trigger bit (TSmn) of the linkage channel 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, it is necessary to set the channel stop
trigger bit (TTmn) of the linkage channel at the same time.
13) When the linkage is running, CKm2/CKm3 cannot be selected because the master and slave
channels require the same operating clock.
14) Timer mode register m0 (TMRm0) is fixed to 0 without a master position. However, because channel
0 is the highest 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 those applicable to the channel group
(forming a collection of master and slave channels with a multi-channel linkage operation function).
If you set 2 or more non-interconnected channel groups, the above basic rules do not apply to each other.
Remark: m: unit number (m=0,1) n: channel number (n=0~3).