www.geehy.com Page 125
Field
Name
R/W
Description
1:0
CC3SEL R/W
Capture/Compare Channel 3 Select
00: CC3 channel is output
01: CC3 channel is input, and IC3 is mapped on TI3
10: CC3 channel is input, and IC3 is mapped on TI4
11: CC3 channel is input, and IC3 is mapped on TRC, and only works in
internal trigger input
Note: This bit can be written only when the channel is disabled (TMRx_CCEN
register CC3EN=0).
3:2
IC3PSC R/W
Input Capture Channel 3 Perscaler Configure
00
:
PSC=1
01
:
PSC=2
10
:
PSC=4
11
:
PSC=8
PSC is prescaled factor, which triggers capture once every PSC events.
7:4
IC3F
R/W
Input Capture Channel 3 Filter Configure
9:8
CC4SEL R/W
Capture/Compare Channel 4 Select
00: CC4 channel is output
01: CC4 channel is input, and IC4 is mapped on TI4
10: CC4 channel is input, and IC4 is mapped on TI3
11: CC4 channel is input, and IC4 is mapped on TRC, and only works in
internal trigger input
Note: This bit can be written only when the channel is disabled (TMRx_CCEN
register CC4EN=0).
11:10 IC4PSC R/W Input Capture Channel 4 Perscaler Configure
15:12
IC4F
R/W Input Capture Channel 4 Filter Configure
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