EasyManua.ls Logo

GigaDevice Semiconductor GD32F3x0 - Figure 16-50. Channel Input Capture Principle

Default Icon
665 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GD32F3x0 User Manual
352
Input capture and output compare channels
The general level2 timer has one independent channel which can be used as capture inputs
or compare match outputs. Each channel is built around a channel capture compare register
including an input stage, channel controller and an output stage.
Channel input capture function
Channel input capture function allows the channel to perform measurements such as pulse
timing, frequency, period, duty cycle and so on. The input stage consists of a digital filter, a
channel polarity selection, edge detection and a channel prescaler. When a selected edge
occurs on the channel input, the current value of the counter is captured into the
TIMERx_CHxCV register, at the same time the CHxIF bit is set and the channel interrupt is
generated if enabled by CHxIE = 1.
Figure 16-50. Channel input capture principle
CI0
Synchronizer
D
presclare
Capture
Register
CH0VAL
Clock
Processer
Counter
TIMER_CK
Q
Filter
D Q D Q
Edge Detector
CI1FE0
ITS
CH0MS
CH0IF
CH0IE
CH0_CC_I
TIMERx_CC_INT
Capture INT From Other Channal
CH0CAPPSC
Edge selector
&inverter
Based on
CH0P&CH0NP
CI0FE0
Rising/Falling
ITI0
ITI3
ITI1
ITI2
CI0FED
Rising&Falling
IS0
CI0FED
First, the channel input signal (CIx) is synchronized to TIMER_CK domain, and then
sampled by a digital filter to generate a filtered input signal. Then through the edge detector,
the rising and fall edge are detected. You can select one of them by CHxP. One more
selector is for the other channel and trig, controlled by CHxMS. The IC_prescaler make
several the input event generate one effective capture event. On the capture event, CHxVAL
will restore the value of Counter.
So, the process can be divided to several steps as below:
Step1: Filter configuration. (CHxCAPFLT in TIMERx_CHCTL0)
Based on the input signal and requested signal quality, configure compatible

Table of Contents

Related product manuals