Basic timers (TIM6&TIM7)
RM0090
688/1731
DocID018909 Rev 11
20
Basic timers (TIM6&TIM7)
This section applies to the whole STM32F4xx family, unless otherwise specified.
20.1 TIM6&TIM7
introduction
The basic timers TIM6 and TIM7 consist of a 16-bit auto-reload counter driven by a
programmable prescaler.
They may be used as generic timers for time-base generation but they are also specifically
used to drive the digital-to-analog converter (DAC). In fact, the timers are internally
connected to the DAC and are able to drive it through their trigger outputs.
The timers are completely independent, and do not share any resources.
20.2
TIM6&TIM7 main features
Basic timer (TIM6&TIM7) features include:
•
16-bit auto-reload upcounter
•
16-bit programmable prescaler used to divide (also “on the fly”) the counter clock
frequency by any factor between 1 and 65536
•
Synchronization circuit to trigger the DAC
•
Interrupt/DMA generation on the update event: counter overflow
Figure 203. Basic timer block diagram
U
Trigger
controller
Stop, Clear or up
TRGO
U
UI
Reset, Ena
b
le, Count,
event
Preload registers transferred
to active registers on U event according to control
b
it
interrupt & DMA output
to DAC
COUNTER
CK_PSC
CNT
CK_CNT
Controller
Internal clock (CK_INT)
TIMxCLK from RCC
±
Prescaler
PSC
Auto-reload Register
Flag
ai14749
b