![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 249](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630249.webp)
www.geehy.com Page 248
Field
Name
R/W
Description
1111: DIV=32
,
N=8
Sampling frequency=timer clock frequency/DIV; the filter length=N,
indicating that a jump is generated by every N events.
9:8
CC2SEL
R/W
Capture/Compare Channel 2 Select
00: CC2 channel is output
01: CC2 channel is input, and IC2 is mapped on TI1
10: CC2 channel is input, and IC2 is mapped on TI2
11: CC2 channel is input, and IC2 is mapped on TRC, and only works in
internal trigger input
Note: This bit can be written only when the channel is closed
(TMRx_CCEN register CC2EN=0).
11:10
IC2PSC
R/W
Input Capture Channel 2 Perscaler Configuration
15:12
IC2F
R/W
Input Capture Channel 2 Filter Configuration
Capture/Compare enable register (TMRx_CCEN)
Offset address: 0x20
Reset value: 0x0000
Field
Name
R/W
Description
0
CC1EN
R/W
Capture/Compare Channel1 Output Enable
When the capture/compare channel 1 is configured as output:
0: Output is disabled
1: Output is enabled
When the capture/compare channel 1 is configured as input:
This bit determines whether the value CNT of the counter can be
captured and enter TMRx_CC1 register
0: Capture is disabled
1: Capture is enabled
1
CC1POL
R/W
Capture/Compare Channel1 Output Polarity Configure
When CC1 channel is configured as output:
0: OC1 high level is valid
1: OC1 low level is valid
When CC1 channel is configured as input:
CC1POL and CC1NPOL control the polarity of the triggered or captured
signals TI1FP1 and TI2FP1 at the same time
00: Non-phase-inverting/rising edge:
TIxFP1 is not reversed phase (triggered in gated and encoder mode),
and is captured at the rising edge of TIxFP1 (reset trigger, capture,
external clock and trigger mode).
01: Inverted phase/Falling edge:
TIxFP1 is reversed phase (triggered in gated and encoder mode), and is
captured at the rising edge of TIxFP1 (reset trigger, capture, external
clock and trigger mode).
10: Reserved
11: Non-phase-inverting/Rising and falling edges:
TIxFP1 is not reversed phase (triggered in gated mode, cannot be used
in encoder mode), and is captured at the rising edge of TIxFP1 (reset
trigger, capture, external clock and trigger mode).