GD32VF103 User Manual
223
15.1.
Advanced timer (TIMERx, x=0)
15.1.1.
Overview
The advanced timer module (TIMER0) is a four-channel timer that supports both input capture
and output compare. They can generate PWM signals to control motor or be used for power
management applications. The advanced timer has a 16-bit counter that can be used as an
unsigned counter.
In addition, the advanced timers can be programmed and be used for counting, their external
events can be used to drive other timers.
Timer also includes a dead-time insertion module which is suitable for motor control
applications.
Timers are completely independent with each other, but they may be synchronized to provide
a larger timer with their counter value incrementing in unison.
15.1.2.
Characteristics
Total channel num: 4.
Counter width: 16-bit.
Clock source of timer is selectable: internal clock, internal trigger, external input, external
trigger.
Multiple counter modes: up counting, down counting and center-aligned counting.
Quadrature decoder: used for motion tracking and determination of both rotation
direction and position.
Hall sensor function: used for 3-phase motor control.
Programmable prescaler: 16-bit. The factor can be changed ongoing.
Each channel is user-configurable: input capture mode, output compare mode,
programmable PWM mode and single pulse mode
Programmable dead time insertion.
Auto reload function.
Programmable counter repetition function.
Break input.
Interrupt output or DMA request: update event, trigger event, compare/capture event and
break input.
Daisy chaining of timer module allows a single timer to start multiple timers.
Timer synchronization allows the selected timers to start counting on the same clock
cycle.
Timer master/slave mode controller.