CMT2380F64
www. cmostek. com
66 / 83
5.10.3
Low power timer (LPTIM)
LPTIM is a 16-bit timer that can work with extremely low power consumption. Thanks to the diversity of clock sources, LPTIM can
operate in all power modes except PD mode. Since LPTIM can run without an internal clock source, it can be used as a "pulse
counter", which is very useful in some applications. In addition, LPTIM has the ability to wake up the system from low-power
consumption mode, which makes it suitable for implementing "timeout function" monitoring with extremely low power consumption.
LPTIM introduces a flexible clock scheme that provides the required functions and performance while minimizing power
consumption.
The main functions of low-power timers include:
◆
16 bit upward automatic loading counter
;
◆
3 bit prescaler, 8 kinds of frequency division factors
(
1
、
2
、
4
、
8
、
16
、
32
、
64
、
128
)
;
◆
Abundant clock source
:
⚫
Internal clock source
:
HSI
,
HSE
,
LSI
,
LSE
,
APB1 and CMP_OUT six clock sources
;
⚫
External clock source input through LPTIM
(
no LP oscillator runs during operation, used for pulse counter
applications
)
;
◆
16 bit ARR automatic loading register
;
◆
16 bit comparator register
;
◆
Continuous or single trigger mode
;
◆
Optional software and hardware input trigger
;
◆
Programmable digital anti-shake filter
;
◆
Configurable IO level polarity
;
◆
Configurable single pulse or PWM output
;
◆
Sopport encoder mode
;
5.10.4
Adcanced control timer (TIM 1/TIM 8)
Two independent advanced timers (TIM1/TIM8), each timer is composed of a 16-bit auto-loading counter driven by a
programmable prescaler. Supports multiple functions, including measuring pulse width of the input signal (input
capture), or generating output waveform (output comparison, PWM, complementary PW M outputembedded in dead
time, etc.). By using timer prescaler and RCC clock control prescaler, pulse width and waveform period can be
adjusted from several microseconds to several milliseconds. Each timer is completelyindependent and does not
share any resources with each other.
The main functions of the advanced timer include:
◆
16-bit up, down, up/down automatic loading counter
◆
16-bit programmable (can be modified in real time) prescaler, the frequency division coefficient of
the counter clock frequency is any value between 1 and 65536
◆
Supports up to 48Mhz as the timer input clock
◆
Up to 4 independent channels :
⚫
Input capture
⚫
Output comparision
⚫
PWM generation (edge or center alignment mode)
⚫
Single pulse mode output
◆
PWM trigger ADC sampling
◆
The trigger time point can be configured by software in the entire PWM cycle
◆
Complementary output with programmable dead time
◆
Use external signals to control the timer or the synchronization circuit when multiple timers are
interconnected
◆
Allow to update the repeat counter of the timer register after a specified number of counter cycles
◆
Break input signal can put the timer output signal in a reset state or a known state
◆
Interrupt/DMA is generated when the following events occur:
⚫
Update
:
counter overflow/downflow, counter initialization (through software or internal/ external trigger)
⚫
Trriger events (counter start, stop, initialization or count by internal/ external trigger)