www.geehy.com Page 182
Field
Name
R/W
Description
3
SPMEN
R/W
Single Pulse Mode Enable
When an update event is generated, the output level of the channel can
be changed; in this mode, the CNTEN bit will be cleared, the counter will
be stopped, and the output level of the channel will not be changed.
0: Disable
1: Enable
4
CNTDIR R/W
Counter Direction
This bit is read-only when the counter is configured as center-aligned
mode or encoder mode.
0: Count up
1: Count down
6:5
CAMSEL R/W
Center Aligned Mode Select
In the center-aligned mode, the counter counts up and down alternately;
otherwise, it will only count up or down.
Different center-aligned modes
affect the timing of setting the output compare interrupt flag bit of the
output channel to 1; when the counter is disabled (CNTEN=0), select the
center-aligned mode.
00: Edge alignment mode
01: Center-aligned mode 1 (the output compare interrupt flag bit of output
channel is set to 1 when counting down)
10: Center-aligned mode 2 (the output compare interrupt flag bit of output
channel is set to 1 when counting up)
11: Cente-aligned mode 3 (the output compare interrupt flag bit of output
channel is set to 1 when counting up/down)
7
ARPEN
R/W
Auto-reload Preload Enable
When the buffer is disabled, the program modification TMRx_AUTORLD
will immediately modify the values loaded to the counter; when the buffer
is enabled, the program modification TMRx_AUTORLD will modify the
values loaded to the counter in the next update event.
0: Disable
1: Enable
9:8
CLKDIV
R/W
Clock Divide Factor
For the configuration of dead time and digital filter, CK_INT provides the
clock, and the dead time and the clock of the digital filter can be adjusted
by setting this bit.
00: t
DTS
=t
CK_INT
01: t
DTS
=2×t
CK_INT
10: t
DTS=
4×t
CK_INT
11: Reserved
15:10
Reserved
Control register 2 (TMRx_CTRL2)
Offset address: 0x04
Reset value: 0x0000
Field
Name
R/W
Description
0
CCPEN
R/W
Capture/Compare Preloaded Enable
This bit affects the change of CCxEN, CCxNEN and OCxMOD values.
When preloading is disabled, the program modification will immediately