CMS32L051 User Manual |Chapter 5 Universal Timer Unit (Timer4)
www.mcu.com.cn 108 / 703
5.1 Function of universal timer unit
The universal timer unit has the following functions:
5.1.1 Independent channel operation function
The independent channel operation function is a function that can use any channel independently
regardless of the operation mode of other channels.
(1) Interval timer
It can be used as a reference timer that generates interrupts (INTTMmn) at regular intervals.
Comparision
operation
Action clock
channel N
interrupt
singnal
(INTTmn)
(2) Square wave output
Whenever an INTTMmn interrupt is generated, alternating and a square wave of 50% duty cycle is output
from the output pin (TOmn) of the timer.
Comparision
operation
Action clock
channel N
timer output
(TOmn)
(3) External event counters
The effective edge of the input signal at the timer input pin (TImn) is counted and can be used as an
event counter that generates an interrupt if a specified number of times are reached.
Comparision
operation
channel N
interrupt
singnal
(INTTmn)
timer input
(TImn)
edge detection
(4) Frequency division function (channel 0 of unit 0 only).
Divides the input clock of the timer input pin (TI00) and outputs it from the output pin (TO00).
Comparision
operation
channel N
timer output
(TOmn)
timer input
(TImn)
(5) Measurement of input pulse intervals
The interval between input pulses is measured by counting at the effective edge of the input pulse signal
at the timer input pin (TImn) and capturing the count value at the effective edge of the next pulse.
capture operation
edge detection
channel N
timer input
(TImn)
00H
xxH
capture
start