www.geehy.com Page 205
Field
Name
R/W
Description
15:10
Reserved
Control event generation register (TMRx_CEG)
Offset address: 0x14
Reset value: 0x0000
Field
Name
R/W
Description
0
UEG
W
Update Event Generate
0: Invalid
1: Initialize the counter and generate the update event
This bit is set to 1 by software, and cleared by hardware.
Note: When an update event is generated, the counter of the prescaler will be
cleared, but the prescaler factor remains unchanged.
In the count-down mode,
the counter reads the value of TMRx_AUTORLD; in center-aligned mode or
count-up mode, the counter will be cleared.
1
CC1EG
W
Capture/Compare Channel1 Event Generation
0: Invalid
1: Capture/Compare event is generated
This bit is set to 1 by software and cleared automatically by hardware.
If Channel 1 is in output mode,
When CC1IFLG=1, if CC1IEN and CC1DEN bits are set, the corresponding
interrupt and DMA request will be generated.
If Channel 1 is in input mode
The value of the capture counter is stored in TMRx_CC1 register; configure
CC1IFLG=1, and if CC1IEN and CC1DEN bits are also set, the corresponding
interrupt and DMA request will be generated; at this time, if CC1IFLG=1, it is
required to configure CC1RCFLG=1.
4:2
Reserved
5
COMG
W
Capture/Compare Control Update Event Generate
0: Invalid
1: Capture/Compare update event is generated
This bit is set to 1 by software and cleared automatically by hardware.
Note: COMG bit is valid only in complementary output channel.
6
Reserved
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 1 (TMRx_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: