ST STM32G4 Series Reference Manual page 1275

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

RM0440
Bit 3 OC1PE: Output compare 1 preload enable
Note: 1: These bits can not be modified as long as LOCK level 3 has been programmed
Bit 2 OC1FE: Output compare 1 fast enable
Bits 1:0 CC1S[1:0]: Capture/Compare 1 selection
Note: CC1S bits are writable only when the channel is OFF (CC1E = 0 in TIMx_CCER).
28.5.9
TIMx capture/compare mode register 2 [alternate]
(TIMx_CCMR2)(x = 2 to 5)
Address offset: 0x01C
Reset value: 0x0000 0000
The same register can be used for input capture mode (this section) or for output compare
mode (next section). The direction of a channel is defined by configuring the corresponding
CCxS bits. All the other bits of this register have a different function for input capture and for
output compare modes. It is possible to combine both modes independently (e.g. channel 1
in input capture mode and channel 2 in output compare mode).
31
30
29
Res.
Res.
Res.
Res.
15
14
13
IC4F[3:0]
rw
rw
rw
Input capture mode
0: Preload register on TIMx_CCR1 disabled. TIMx_CCR1 can be written at anytime, the
new value is taken in account immediately.
1: Preload register on TIMx_CCR1 enabled. Read/Write operations access the preload
register. TIMx_CCR1 preload value is loaded in the active register at each update event.
(LOCK bits in TIMx_BDTR register) and CC1S=00 (the channel is configured in
output).
2: The PWM mode can be used without validating the preload register only in one-
pulse mode (OPM bit set in TIMx_CR1 register). Else the behavior is not guaranteed.
This bit is used to accelerate the effect of an event on the trigger in input on the CC output.
0: CC1 behaves normally depending on counter and CCR1 values even when the trigger is
ON. The minimum delay to activate CC1 output when an edge occurs on the trigger input is
5 clock cycles.
1: An active edge on the trigger input acts like a compare match on CC1 output. Then, OC
is set to the compare level independently from the result of the comparison. Delay to sample
the trigger input and to activate CC1 output is reduced to 3 clock cycles. OCFE acts only if
the channel is configured in PWM1 or PWM2 mode.
This bit-field defines the direction of the channel (input/output) as well as the used input.
00: CC1 channel is configured as output.
01: CC1 channel is configured as input, tim_ic1 is mapped on tim_ti1.
10: CC1 channel is configured as input, tim_ic1 is mapped on tim_ti2.
11: CC1 channel is configured as input, tim_ic1 is mapped on tim_trc. This mode is working
only if an internal trigger input is selected through TS bit (TIMx_SMCR register)
28
27
26
25
Res.
Res.
Res.
12
11
10
9
IC4PSC[1:0]
CC4S[1:0]
rw
rw
rw
rw
General-purpose timers (TIM2/TIM3/TIM4/TIM5)
24
23
22
Res.
Res.
Res.
8
7
6
IC3F[3:0]
rw
rw
rw
RM0440 Rev 1
21
20
19
18
Res.
Res.
Res.
Res.
5
4
3
2
IC3PSC[1:0]
rw
rw
rw
rw
17
16
Res.
Res.
1
0
CC3S[1:0]
rw
rw
1275/2083
1297

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G4 Series and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF