
CH32V003
Reference Manual
V1.3
106
digital filter length. The digital filter consists of an
event counter, which records N events and then
generates a jump in the output.
0000: no filter, sampled at fDTS.
1000: sampling frequency Fsampling = Fdts/8, N = 6.
0001: sampling frequency Fsampling=Fck_int, N=2.
1001: sampling frequency Fsampling = Fdts/8, N = 8.
0010: sampling frequency Fsampling=Fck_int, N=4.
1010: sampling frequency Fsampling = Fdts/16, N = 5.
0011: sampling frequency Fsampling=f=Fck_int, N=8.
1011: sampling frequency Fsampling = Fdts/16, N = 6.
0100: sampling frequency Fsampling = Fdts/2, N = 6.
1100: sampling frequency Fsampling = Fdts/16, N = 8.
0101: sampling frequency Fsampling = Fdts/2, N = 8.
1101: sampling frequency Fsampling = Fdts/32, N = 5.
0110: sampling frequency Fsampling = Fdts/4, N = 6.
1110: sampling frequency Fsampling = Fdts/32, N = 6.
0111: sampling frequency Fsampling = Fdts/4,
N = 8.
1111: Sampling frequency Fsampling=Fdts/32, N=8.
[11:10] IC2PSC
RW
Compare capture channel 2 prescaler configuration
field, these 2 bits define the prescaler coefficient for
compare capture channel 2. Once CC1E = 0, the
prescaler is reset.
00: without prescaler, one capture is triggered for each
edge detected on the capture input.
01: capture triggered every 2 events.
10: capture triggered every 4 events.
11: Capture is triggered every 8 events.
0
[9:8]
CC2S
RW
Compare the capture channel 2 input selection field,
these 2 bits define the direction of the channel
(input/output), and the selection of the input pin.
00: comparative capture channel 1 channel is
configured as an output.
01: comparison capture channel 1 channel is configured
as an input and IC1 is mapped on TI1.
10: comparison capture channel 1 channel is configured
as an input and IC1 is mapped on TI2.
11: The compare capture channel 1 channel is
configured as an input and IC1 is mapped on TRC. This
mode works only when the internal trigger input is
selected (by the TS bit).
Note: CC1S is writable only when the channel is off
(CC1E is 0).
0
[7:4]
IC1F
RW Input capture filter 1 configuration field.
0
[3:2]
IC1PSC
RW
Compare the capture channel 1 prescale configuration
field.
0
[1:0]
CC1S
RW Compare capture channel 1 input selection fields.
0
10.4.8 Compare/Capture control register 2 (TIM1_CHCTLR2)
Offset address: 0x1C
The channel can be used in input (capture mode) or output (compare mode), and the direction of the channel
is defined by the corresponding CCxS bit. The other bits of this register serve different purposes in input and
output modes. OCxx describes the function of the channel in output mode and ICxx describes the function of
the channel in input mode.