www.geehy.com Page 194
Field
Name
R/W
Description
1: Trigger event is generated
This bit is set to 1 by software and cleared automatically by hardware.
7
BEG
W
Break Event Generate
0: Invalid
1: Break event is generated
This bit is set to 1 by software and cleared automatically by hardware.
15:8
Reserved
Capture/Compare mode register (TMR15_CCM1)
Offset address: 0x18
Reset value: 0x0000
The timer can be configured as input (capture mode) or output (compare mode)
by CCxSEL bit. The functions of other bits of the register are different in input
and output modes, and the functions of the same bit are different in output mode
and input mode. The OCxx in the register describes the function of the channel
in the output mode, and the ICxx in the register describes the function of the
channel in the input mode.
Output compare mode:
Field
Name
R/W
Description
1:0
CC1SEL
R/W
Capture/Compare Channel 1 Select
This bit defines the input/output direction and the selected input pin.
00: CC1 channel is output
01: CC1 channel is input, and IC1 is mapped on TI1
10: CC1 channel is input, and IC1 is mapped on TI2
11: CC1 channel is input, and IC1 is mapped on TRC, and only works in
internal trigger input
Note: This bit can be written only when the channel is disabled
(TMR15_CCEN register CC1EN=0).
2
OC1FEN R/W
Output Compare Channel1 Fast Enable
0: Disable
1: Enable
This bit is used to improve the response of the capture/compare output to
the trigger input event.
3
OC1PEN R/W
Output Compare Channel1 Preload Enable
0: Preloading function is disabled; write the value of TMRx_CC1 register
through the program and it will work immediately.
1: Preloading function is enabled; write the value of TMRx_CC1 register
through the program and it will work after an update event is generated.
Note: When the protection level is 3 and the channel is configured as output,
this bit cannot be modified.
When the preload register is uncertain, PWM
mode can be used only in single pulse mode (SPMEN=1); otherwise, the
following output compare result is uncertain.
6:4
OC1MOD R/W
Output Compare Channel1 Mode Configure
000: Freeze The output compare has no effect on OC1REF
001: The output value is high when matching. When the value of counter
CNT matches the value CCx of capture/compare register, OC1REF will
be forced to be at high level
010: The output value is low when matching. When the value of the counter
matches the value of the capture/compareregister, OC1REF will be
forced to be at low level
011: Output flaps when matching. When the value of the counter matches