Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
269
/
631
Bit field
Name
Description
3
CC3GN
Capture/Compare 3 generation
See TIMx_EVTGEN.CC1GN description.
2
CC2GN
Capture/Compare 2 generation
See TIMx_EVTGEN.CC1GN description.
1
CC1GN
Capture/Compare 1 generation
This bit can generate a capture/compare event when set by software. This bit is automatically
cleared by hardware.
When the corresponding channel of CC1 is in output mode:
The TIMx_STS.CC1ITF flag will be pulled high, if the corresponding interrupt and DMA are
enabled, the corresponding interrupt and DMA will be generated.
When the corresponding channel of CC1 is in input mode:
TIMx_CCDAT1 will capture the current counter value, and the TIMx_STS.CC1ITF flag will be
pulled high, if the corresponding interrupt and DMA are enabled, the corresponding interrupt
and DMA will be generated. If The IMx_STS.CC1ITF is already pulled high, pull
TIMx_STS.CC1OCF high.
0: No action
1: Generated a CC1 capture/compare event
0
UDGN
Update generation
This bit can generate an update event when set by software. And at this time the counter will be
reinitialized, the prescaler counter will be cleared, the counter will be cleared in center-aligned or up-
counting mode, but take TIMx_AR in down-counting mode the value of the register. This bit is
automatically cleared by hardware.
0: No action
1: Generated an update event
Capture/compare mode register 1 (TIMx_CCMOD1)
Offset address: 0x18
Reset value: 0x0000
Channels can be used for input (capture mode) or output (compare mode), and the direction of the channel is defined
by the corresponding CCxSEL bit. The other bits of the register act differently in input and output modes. OCx
describes the function of a channel in output mode, ICx describes the function of a channel in input mode. Hence,
please note that the same bit can have different meanings for output mode and for input mode.
Output compare mode:
Bit field
Name
Description
15
OC2CEN
Output Compare 2 clear enable