WCH CH32V003 Series Reference Manual page 105

Table of Contents

Advertisement

CH32V003 Reference Manual
11
OC2PE
10
OC2FE
[9:8]
CC2S
7
OC1CE
[6:4]
OC1M
3
OC1PE
2
OC1FE
[1:0]
CC1S
Capture mode (pin direction is input).
Bit
Name
[15:12]
IC2F
V1.3
comparison result is changed or when switching from
freeze mode to PWM mode in the output comparison
mode.
Compare Capture Register 2 preload enable bit.
1: Enable the preload function of compare capture
registers, read and write operations only operate on the
preload registers, the preload value of compare capture
register 1 is loaded into the current shadow register
when the update event comes;
0: Disable the preload function of compare capture
RW
register 2, compare capture register 2 can be written at
any time, and the newly written value takes effect
immediately.
Note: Once the LOCK level is set to 3 and CC1S=00,
this bit cannot be modified; PWM mode can be used
only in single pulse mode (OPM=1) without confirming
the pre-load register, otherwise its action is not
determined.
Compare Capture Channel 2 fast enable bit, this bit is
used to speed up the response of the compare capture
channel output to a trigger input event.
1: The active edge of the input to the flipflop acts as if
a comparison match has occurred. Therefore, the OC is
set to the comparison level independent of the
comparison result. The delay between the valid edge of
the sample trigger and the output of the compare
RW
capture channel 2 is reduced to 3 clock cycles.
0: Based on the value of the counter and compare
capture register 2, compare capture channel 2 operates
normally, even if the flip-flop is open. The minimum
delay to activate the compare capture channel 2 output
is 5 clock cycles when the input of the flipflop has a
valid edge.
OC2FE only works when the channel is configured to
PWM1 or PWM2 mode.
Compare capture channel 2 input selection fields.
00: comparison capture channel 2 is configured as an
output.
01: comparison capture channel 2 is configured as an
input and IC2 is mapped on TI2.
10: comparison capture channel 2 is configured as an
RW
input and IC2 is mapped on TI1.
11: Compare Capture Channel 2 is configured as an
input and IC2 is mapped on TRC. This mode works
only when the internal trigger input is selected (by the
TS bit).
Note: Compare Capture Channel 2 is writable only
when the channel is off (when CC2E is zero).
RW Compare capture channel 1 clear enable bit.
RW Compare capture channel 1 mode setting field.
RW Compare capture register 1 preload enable bit.
RW Compare capture channel 1 fast enable bit.
RW Compare capture channel 1 input selection fields.
Access
The input capture filter 2 configuration field, these bits
RW
set the sampling frequency of the TI1 input and the
105
Description
http://wch.cn
0
0
0
0
0
0
0
0
Reset
value
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents