STM32F103xC, STM32F103xD, STM32F103xE
Description
periodic interrupt. It is clocked by a 32.768 kHz external crystal, resonator or oscillator, the
internal low power RC oscillator or the high-speed external clock divided by 128. The
internal low-speed RC has a typical frequency of 40 kHz. The RTC can be calibrated using
an external 512 Hz output to compensate for any natural quartz deviation. The RTC features
a 32-bit programmable counter for long term measurement using the Compare register to
generate an alarm. A 20-bit prescaler is used for the time base clock and is by default
configured to generate a time base of 1 second from a clock at 32.768 kHz.
2.3.17
Timers and watchdogs
The high-density STM32F103xx performance line devices include up to two advanced-
control timers, up to four general-purpose timers, two basic timers, two watchdog timers and
a SysTick timer.
Table 4 compares the features of the advanced-control, general-purpose and basic timers.
Table 4.
Timer
High-density timer feature comparison
Counter Counter Prescaler DMA request Capture/compare Complementary
resolution
type
factor
generation
channels
outputs
Up,
down,
up/down and 65536
Any integer
between 1
TIM1,
TIM8
16-bit
Yes
4
Yes
TIM2,
TIM3,
TIM4,
TIM5
Up,
down,
up/down and 65536
Any integer
between 1
16-bit
16-bit
Yes
Yes
4
0
No
No
Any integer
between 1
and 65536
TIM6,
TIM7
Up
Advanced-control timers (TIM1 and TIM8)
The two advanced-control timers (TIM1 and TIM8) can each be seen as a three-phase
PWM multiplexed on 6 channels. They have complementary PWM outputs with
programmable inserted dead-times. They can also be seen as a complete general-purpose
timer. The 4 independent channels can be used for:
●
●
●
●
Input capture
Output compare
PWM generation (edge or center-aligned modes)
One-pulse mode output
If configured as a standard 16-bit timer, it has the same features as the TIMx timer. If
configured as the 16-bit PWM generator, it has full modulation capability (0-100%).
In debug mode, the advanced-control timer counter can be frozen and the PWM outputs
disabled to turn off any power switch driven by these outputs.
Many features are shared with those of the general-purpose TIM timers which have the
same architecture. The advanced-control timer can therefore work together with the TIM
timers via the Timer Link feature for synchronization or event chaining.
Doc ID 14611 Rev 8
19/130