ST7LITE2
11.2 12-BIT AUTORELOAD TIMER 2 (AT2)
11.2.1 Introduction
The 12-bit Autoreload Timer can be used for gen-
eral-purpose timing functions. It is based on a free-
running 12-bit upcounter with an input capture reg-
ister and four PWM output channels. There are 6
external pins:
– Four PWM outputs
– ATIC pin for the Input Capture function
– BREAK pin for forcing a break condition on the
PWM outputs
11.2.2 Main Features
■ 12-bit upcounter with 12-bit autoreload register
(ATR)
Figure 34. Block Diagram
■ Maskable overflow interrupt
■ Generation of four independent PWMx signals
■ Frequency 2KHz-4MHz (@ 8 MHz fCPU)
– Programmable duty-cycles
– Polarity control
– Programmable output modes
– Maskable Compare interrupt
■ Input Capture
– 12-bit input capture register (ATICR)
– Triggered by rising and falling edges
– Maskable IC interrupt
ATIC
12-BIT INPUT CAPTURE REGISTER
ATICR
IC INTERRUPT
REQUEST
ATCSR
OVF INTERRUPT
REQUEST
fLTIMER
(1 ms
timebase
@ 8MHz)
fCPU
32 MHz
0 ICF ICIE CK1 CK0 OVF OVFIE CMPIE
fCOUNTER
CNTR
CMPF0
CMPF1
CMPF2
CMPF3
12-BIT UPCOUNTER
CMP
INTERRUPT
REQUEST
12-BIT AUTORELOAD REGISTER
ATR
DCR0H
Preload
DCR0L
Preload
on OVF Event
IF TRAN=1
12-BIT DUTY CYCLE VALUE (shadow)
4 PWM Channels
CMPFx bit
COMP-
PARE
OEx bit
OPx bit
fPWM POL-
ARITY
PWMx
55/133
1