RM0041
Flag
16.3
TIM6 and TIM7 functional description
16.3.1
Time-base unit
The main block of the programmable timer is a 16-bit upcounter with its related auto-reload
register. The counter clock can be divided by a prescaler.
The counter, the auto-reload register and the prescaler register can be written or read by
software. This is true even when the counter is running.
The time-base unit includes:
•
Counter register (TIMx_CNT)
•
Prescaler register (TIMx_PSC)
•
Auto-Reload register (TIMx_ARR)
The auto-reload register is preloaded. The preload register is accessed each time an
attempt is made to write or read the auto-reload register. The contents of the preload
register are transferred into the shadow register permanently or at each update event UEV,
depending on the auto-reload preload enable bit (ARPE) in the TIMx_CR1 register. The
update event is sent when the counter reaches the overflow value and if the UDIS bit equals
0 in the TIMx_CR1 register. It can also be generated by software. The generation of the
update event is described in detail for each configuration.
The counter is clocked by the prescaler output CK_CNT, which is enabled only when the
counter enable bit (CEN) in the TIMx_CR1 register is set.
Note that the actual counter enable signal CNT_EN is set 1 clock cycle after CEN.
Figure 186. Basic timer block diagram
TIMxCLK from RCC
CK_PSC
PSC
Prescaler
Preload registers transferred
to active registers on U event according to control bit
event
interrupt & DMA output
Internal clock (CK_INT)
Controller
U
Auto-reload Register
Stop, Clear or up
CK_CNT
CNT
±
COUNTER
RM0041 Rev 6
Basic timers (TIM6 and TIM7)
TRGO
Trigger
to DAC
controller
Reset, Enable, Count,
UI
U
ai14749b
457/709
468
Need help?
Do you have a question about the STM32F100 Series and is the answer not in the manual?
Questions and answers