\n

TIM

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x400 byte (0x0)
mem_usage : registers
protection :

Registers

TIM1_CR1 (CR1)

TIM1_SR (SR)

TIM1_EGR (EGR)

TIM1_CCMR1_Output (CCMR1_Output)

TIM1_CCMR1_Input (CCMR1_Input)

TIM1_CCMR2_Output (CCMR2_Output)

TIM1_CCMR2_Input (CCMR2_Input)

TIM1_CCER (CCER)

TIM1_CNT (CNT)

TIM1_PSC (PSC)

TIM1_ARR (ARR)

TIM1_RCR (RCR)

TIM1_CCR1 (CCR1)

TIM1_CCR2 (CCR2)

TIM1_CCR3 (CCR3)

TIM1_DCR (DCR)

TIM1_DMAR (DMAR)

TIM1_CR2 (CR2)

TIM1_CCR4 (CCR4)

TIM1_BDTR (BDTR)

TIM1_CCR5 (CCR5)

TIM1_CCR6 (CCR6)

TIM1_CCMR3 (CCMR3)

TIM1_DTR2 (DTR2)

TIM1_ECR (ECR)

TIM1_TISEL (TISEL)

TIM1_AF1 (AF1)

TIM1_AF2 (AF2)

TIM1_SMCR (SMCR)

TIM1_DIER (DIER)


TIM1_CR1 (CR1)

TIM1 control register 1
address_offset : 0x0 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CR1 TIM1_CR1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CEN UDIS URS OPM DIR CMS ARPE CKD UIFREMAP DITHEN

CEN : Counter enable Note: External clock, gated mode and encoder mode can work only if the CEN bit has been previously set by software. However trigger mode can set the CEN bit automatically by hardware.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Counter disabled

0x1 : B_0x1

Counter enabled

End of enumeration elements list.

UDIS : Update disable This bit is set and cleared by software to enable/disable UEV event generation. Counter overflow/underflow Setting the UG bit Update generation through the slave mode controller Buffered registers are then loaded with their preload values.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

UEV enabled. The Update (UEV) event is generated by one of the following events:

0x1 : B_0x1

UEV disabled. The Update event is not generated, shadow registers keep their value (ARR, PSC, CCRx). However the counter and the prescaler are reinitialized if the UG bit is set or if a hardware reset is received from the slave mode controller.

End of enumeration elements list.

URS : Update request source This bit is set and cleared by software to select the UEV event sources. Counter overflow/underflow Setting the UG bit Update generation through the slave mode controller
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Any of the following events generate an update interrupt or DMA request if enabled. These events can be:

0x1 : B_0x1

Only counter overflow/underflow generates an update interrupt or DMA request if enabled.

End of enumeration elements list.

OPM : One pulse mode
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Counter is not stopped at update event

0x1 : B_0x1

Counter stops counting at the next update event (clearing the bit CEN)

End of enumeration elements list.

DIR : Direction Note: This bit is read only when the timer is configured in Center-aligned mode or Encoder mode.
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Counter used as upcounter

0x1 : B_0x1

Counter used as downcounter

End of enumeration elements list.

CMS : Center-aligned mode selection Note: It is not allowed to switch from edge-aligned mode to center-aligned mode as long as the counter is enabled (CEN=1)
bits : 5 - 6 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Edge-aligned mode. The counter counts up or down depending on the direction bit (DIR).

0x1 : B_0x1

Center-aligned mode 1. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting down.

0x2 : B_0x2

Center-aligned mode 2. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set only when the counter is counting up.

0x3 : B_0x3

Center-aligned mode 3. The counter counts up and down alternatively. Output compare interrupt flags of channels configured in output (CCxS=00 in TIMx_CCMRx register) are set both when the counter is counting up or down.

End of enumeration elements list.

ARPE : Auto-reload preload enable
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_ARR register is not buffered

0x1 : B_0x1

TIMx_ARR register is buffered

End of enumeration elements list.

CKD : Clock division This bit-field indicates the division ratio between the timer clock (tim_ker_ck) frequency and the dead-time and sampling clock (tDTS)used by the dead-time generators and the digital filters (tim_etr_in, tim_tix),
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tDTS=ttim_ker_ck

0x1 : B_0x1

tDTS=2*ttim_ker_ck

0x2 : B_0x2

tDTS=4*ttim_ker_ck

0x3 : B_0x3

Reserved, do not program this value

End of enumeration elements list.

UIFREMAP : UIF status bit remapping
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No remapping. UIF status bit is not copied to TIMx_CNT register bit 31.

0x1 : B_0x1

Remapping enabled. UIF status bit is copied to TIMx_CNT register bit 31.

End of enumeration elements list.

DITHEN : Dithering enable Note: The DITHEN bit can only be modified when CEN bit is reset.
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Dithering disabled

0x1 : B_0x1

Dithering enabled

End of enumeration elements list.


TIM1_SR (SR)

TIM1 status register
address_offset : 0x10 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_SR TIM1_SR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 UIF CC1IF CC2IF CC3IF CC4IF COMIF TIF BIF B2IF CC1OF CC2OF CC3OF CC4OF SBIF CC5IF CC6IF IDXF DIRF IERRF TERRF

UIF : Update interrupt flag This bit is set by hardware on an update event. It is cleared by software. At overflow or underflow regarding the repetition counter value (update if repetition counter = 0) and if the UDIS=0 in the TIMx_CR1 register. When CNT is reinitialized by software using the UG bit in TIMx_EGR register, if URS=0 and UDIS=0 in the TIMx_CR1 register. When CNT is reinitialized by a trigger event (refer to control register (TIMx_SMCR)(x = 1, 8)), if URS=0 and UDIS=0 in the TIMx_CR1 register.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No update occurred.

0x1 : B_0x1

Update interrupt pending. This bit is set by hardware when the registers are updated:

End of enumeration elements list.

CC1IF : Capture/compare 1 interrupt flag This flag is set by hardware. It is cleared by software (input capture or output compare mode) or by reading the TIMx_CCR1 register (input capture mode only). If channel CC1 is configured as output: this flag is set when the content of the counter TIMx_CNT matches the content of the TIMx_CCR1 register. When the content of TIMx_CCR1 is greater than the content of TIMx_ARR, the CC1IF bit goes high on the counter overflow (in up-counting and up/down-counting modes) or underflow (in downcounting mode). There are 3 possible options for flag setting in center-aligned mode, refer to the CMS bits in the TIMx_CR1 register for the full description. If channel CC1 is configured as input: this bit is set when counter value has been captured in TIMx_CCR1 register (an edge has been detected on IC1, as per the edge sensitivity defined with the CC1P and CC1NP bits setting, in TIMx_CCER).
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No compare match / No input capture occurred

0x1 : B_0x1

A compare match or an input capture occurred

End of enumeration elements list.

CC2IF : Capture/compare 2 interrupt flag Refer to CC1IF description
bits : 2 - 2 (1 bit)
access : read-write

CC3IF : Capture/compare 3 interrupt flag Refer to CC1IF description
bits : 3 - 3 (1 bit)
access : read-write

CC4IF : Capture/compare 4 interrupt flag Refer to CC1IF description
bits : 4 - 4 (1 bit)
access : read-write

COMIF : COM interrupt flag This flag is set by hardware on COM event (when capture/compare Control bits - CCxE, CCxNE, OCxM - have been updated). It is cleared by software.
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No COM event occurred.

0x1 : B_0x1

COM interrupt pending.

End of enumeration elements list.

TIF : Trigger interrupt flag This flag is set by hardware on the TRG trigger event (active edge detected on tim_trgi input when the slave mode controller is enabled in all modes but gated mode. It is set when the counter starts or stops when gated mode is selected. It is cleared by software.
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No trigger event occurred.

0x1 : B_0x1

Trigger interrupt pending.

End of enumeration elements list.

BIF : Break interrupt flag This flag is set by hardware as soon as the break input goes active. It can be cleared by software if the break input is not active.
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No break event occurred.

0x1 : B_0x1

An active level has been detected on the break input. An interrupt is generated if BIE=1 in the TIMx_DIER register.

End of enumeration elements list.

B2IF : Break 2 interrupt flag This flag is set by hardware as soon as the break 2 input goes active. It can be cleared by software if the break 2 input is not active.
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No break event occurred.

0x1 : B_0x1

An active level has been detected on the break 2 input. An interrupt is generated if BIE=1 in the TIMx_DIER register.

End of enumeration elements list.

CC1OF : Capture/compare 1 overcapture flag This flag is set by hardware only when the corresponding channel is configured in input capture mode. It is cleared by software by writing it to '0’.
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No overcapture has been detected.

0x1 : B_0x1

The counter value has been captured in TIMx_CCR1 register while CC1IF flag was already set

End of enumeration elements list.

CC2OF : Capture/compare 2 overcapture flag Refer to CC1OF description
bits : 10 - 10 (1 bit)
access : read-write

CC3OF : Capture/compare 3 overcapture flag Refer to CC1OF description
bits : 11 - 11 (1 bit)
access : read-write

CC4OF : Capture/compare 4 overcapture flag Refer to CC1OF description
bits : 12 - 12 (1 bit)
access : read-write

SBIF : System break interrupt flag This flag is set by hardware as soon as the system break input goes active. It can be cleared by software if the system break input is not active. This flag must be reset to re-start PWM operation.
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No break event occurred.

0x1 : B_0x1

An active level has been detected on the system break input. An interrupt is generated if BIE=1 in the TIMx_DIER register.

End of enumeration elements list.

CC5IF : Compare 5 interrupt flag Refer to CC1IF description Note: Channel 5 can only be configured as output.
bits : 16 - 16 (1 bit)
access : read-write

CC6IF : Compare 6 interrupt flag Refer to CC1IF description Note: Channel 6 can only be configured as output.
bits : 17 - 17 (1 bit)
access : read-write

IDXF : Index interrupt flag This flag is set by hardware when an index event is detected. It is cleared by software by writing it to '0’.
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No index event occurred.

0x1 : B_0x1

An index event has occurred

End of enumeration elements list.

DIRF : Direction change interrupt flag This flag is set by hardware when the direction changes in encoder mode (DIR bit value in TIMx_CR is changing). It is cleared by software by writing it to '0’.
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No direction change

0x1 : B_0x1

Direction change

End of enumeration elements list.

IERRF : Index error interrupt flag This flag is set by hardware when an index error is detected. It is cleared by software by writing it to '0’.
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No index error has been detected.

0x1 : B_0x1

An index error has been detected

End of enumeration elements list.

TERRF : Transition error interrupt flag This flag is set by hardware when a transition error is detected in encoder mode. It is cleared by software by writing it to '0’.
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No encoder transition error has been detected.

0x1 : B_0x1

An encoder transition error has been detected

End of enumeration elements list.


TIM1_EGR (EGR)

TIM1 event generation register
address_offset : 0x14 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_EGR TIM1_EGR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 UG CC1G CC2G CC3G CC4G COMG TG BG B2G

UG : Update generation This bit can be set by software, it is automatically cleared by hardware.
bits : 0 - 0 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

Reinitialize the counter and generates an update of the registers. Note that the prescaler counter is cleared too (anyway the prescaler ratio is not affected). The counter is cleared if the center-aligned mode is selected or if DIR=0 (upcounting), else it takes the auto-reload value (TIMx_ARR) if DIR=1 (downcounting).

End of enumeration elements list.

CC1G : Capture/compare 1 generation This bit is set by software in order to generate an event, it is automatically cleared by hardware. If channel CC1 is configured as output: CC1IF flag is set, Corresponding interrupt or DMA request is sent if enabled. If channel CC1 is configured as input: The current value of the counter is captured in TIMx_CCR1 register. The CC1IF flag is set, the corresponding interrupt or DMA request is sent if enabled. The CC1OF flag is set if the CC1IF flag was already high.
bits : 1 - 1 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

A capture/compare event is generated on channel 1:

End of enumeration elements list.

CC2G : Capture/compare 2 generation Refer to CC1G description
bits : 2 - 2 (1 bit)
access : write-only

CC3G : Capture/compare 3 generation Refer to CC1G description
bits : 3 - 3 (1 bit)
access : write-only

CC4G : Capture/compare 4 generation Refer to CC1G description
bits : 4 - 4 (1 bit)
access : write-only

COMG : Capture/compare control update generation This bit can be set by software, it is automatically cleared by hardware Note: This bit acts only on channels having a complementary output.
bits : 5 - 5 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

When CCPC bit is set, it allows to update CCxE, CCxNE and OCxM bits

End of enumeration elements list.

TG : Trigger generation This bit is set by software in order to generate an event, it is automatically cleared by hardware.
bits : 6 - 6 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

The TIF flag is set in TIMx_SR register. Related interrupt or DMA transfer can occur if enabled.

End of enumeration elements list.

BG : Break generation This bit is set by software in order to generate an event, it is automatically cleared by hardware.
bits : 7 - 7 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

A break event is generated. MOE bit is cleared and BIF flag is set. Related interrupt or DMA transfer can occur if enabled.

End of enumeration elements list.

B2G : Break 2 generation This bit is set by software in order to generate an event, it is automatically cleared by hardware.
bits : 8 - 8 (1 bit)
access : write-only

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

A break 2 event is generated. MOE bit is cleared and B2IF flag is set. Related interrupt can occur if enabled.

End of enumeration elements list.


TIM1_CCMR1_Output (CCMR1_Output)

capture/compare mode register 1 (output mode)
address_offset : 0x18 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCMR1_Output TIM1_CCMR1_Output read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CC1S OC1FE OC1PE OC1M OC1CE CC2S OC2FE OC2PE OC2M OC2CE OC1M_bit3 OC2M_bit3

CC1S : Capture/Compare 1 selection
bits : 0 - 1 (2 bit)

OC1FE : Output Compare 1 fast enable
bits : 2 - 2 (1 bit)

OC1PE : Output Compare 1 preload enable
bits : 3 - 3 (1 bit)

OC1M : Output Compare 1 mode
bits : 4 - 6 (3 bit)

OC1CE : Output Compare 1 clear enable
bits : 7 - 7 (1 bit)

CC2S : Capture/Compare 2 selection
bits : 8 - 9 (2 bit)

OC2FE : Output Compare 2 fast enable
bits : 10 - 10 (1 bit)

OC2PE : Output Compare 2 preload enable
bits : 11 - 11 (1 bit)

OC2M : Output Compare 2 mode
bits : 12 - 14 (3 bit)

OC2CE : Output Compare 2 clear enable
bits : 15 - 15 (1 bit)

OC1M_bit3 : Output Compare 1 mode - bit 3
bits : 16 - 16 (1 bit)

OC2M_bit3 : Output Compare 2 mode - bit 3
bits : 24 - 24 (1 bit)


TIM1_CCMR1_Input (CCMR1_Input)

TIM1 capture/compare mode register 1 [alternate]
address_offset : 0x18 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
alternate_register : TIM1_CCMR1_Output
reset_Mask : 0x0

TIM1_CCMR1_Input TIM1_CCMR1_Input read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CC1S IC1PSC IC1F CC2S IC2PSC IC2F

CC1S : Capture/compare 1 Selection This bit-field defines the direction of the channel (input/output) as well as the used input. Note: CC1S bits are writable only when the channel is OFF (CC1E = '0’ in TIMx_CCER).
bits : 0 - 1 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC1 channel is configured as output

0x1 : B_0x1

CC1 channel is configured as input, tim_ic1 is mapped on tim_ti1

0x2 : B_0x2

CC1 channel is configured as input, tim_ic1 is mapped on tim_ti2

0x3 : B_0x3

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)

End of enumeration elements list.

IC1PSC : Input capture 1 prescaler This bit-field defines the ratio of the prescaler acting on CC1 input (tim_ic1). The prescaler is reset as soon as CC1E=’0’ (TIMx_CCER register).
bits : 2 - 3 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

no prescaler, capture is done each time an edge is detected on the capture input

0x1 : B_0x1

capture is done once every 2 events

0x2 : B_0x2

capture is done once every 4 events

0x3 : B_0x3

capture is done once every 8 events

End of enumeration elements list.

IC1F : Input capture 1 filter This bit-field defines the frequency used to sample tim_ti1 input and the length of the digital filter applied to tim_ti1. The digital filter is made of an event counter in which N consecutive events are needed to validate a transition on the output:
bits : 4 - 7 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No filter, sampling is done at fDTS

0x1 : B_0x1

fSAMPLING=ftim_ker_ck, N=2

0x2 : B_0x2

fSAMPLING=ftim_ker_ck, N=4

0x3 : B_0x3

fSAMPLING=ftim_ker_ck, N=8

0x4 : B_0x4

fSAMPLING=fDTS/2, N=6

0x5 : B_0x5

fSAMPLING=fDTS/2, N=8

0x6 : B_0x6

fSAMPLING=fDTS/4, N=6

0x7 : B_0x7

fSAMPLING=fDTS/4, N=8

0x8 : B_0x8

fSAMPLING=fDTS/8, N=6

0x9 : B_0x9

fSAMPLING=fDTS/8, N=8

0xA : B_0xA

fSAMPLING=fDTS/16, N=5

0xB : B_0xB

fSAMPLING=fDTS/16, N=6

0xC : B_0xC

fSAMPLING=fDTS/16, N=8

0xD : B_0xD

fSAMPLING=fDTS/32, N=5

0xE : B_0xE

fSAMPLING=fDTS/32, N=6

0xF : B_0xF

fSAMPLING=fDTS/32, N=8

End of enumeration elements list.

CC2S : Capture/compare 2 selection This bit-field defines the direction of the channel (input/output) as well as the used input. Note: CC2S bits are writable only when the channel is OFF (CC2E = '0’ in TIMx_CCER).
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC2 channel is configured as output

0x1 : B_0x1

CC2 channel is configured as input, tim_ic2 is mapped on tim_ti2

0x2 : B_0x2

CC2 channel is configured as input, tim_ic2 is mapped on tim_ti1

0x3 : B_0x3

CC2 channel is configured as input, tim_ic2 is mapped on tim_trc. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register)

End of enumeration elements list.

IC2PSC : Input capture 2 prescaler
bits : 10 - 11 (2 bit)
access : read-write

IC2F : Input capture 2 filter
bits : 12 - 15 (4 bit)
access : read-write


TIM1_CCMR2_Output (CCMR2_Output)

capture/compare mode register 2 (output mode)
address_offset : 0x1C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCMR2_Output TIM1_CCMR2_Output read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CC3S_1_0 OC3FE OC3PE OC3M_2_0 OC3CE CC4S_1_0 OC4FE OC4PE OC4M_3_0 OC4CE OC3M_3 OC4M_bit3

CC3S_1_0 : Capture/Compare 3 selection
bits : 0 - 1 (2 bit)

OC3FE : Output compare 3 fast enable
bits : 2 - 2 (1 bit)

OC3PE : Output compare 3 preload enable
bits : 3 - 3 (1 bit)

OC3M_2_0 : Output compare 3 mode
bits : 4 - 6 (3 bit)

OC3CE : Output compare 3 clear enable
bits : 7 - 7 (1 bit)

CC4S_1_0 : Capture/Compare 4 selection
bits : 8 - 9 (2 bit)

OC4FE : Output compare 4 fast enable
bits : 10 - 10 (1 bit)

OC4PE : Output compare 4 preload enable
bits : 11 - 11 (1 bit)

OC4M_3_0 : Output compare 4 mode
bits : 12 - 14 (3 bit)

OC4CE : Output compare 4 clear enable
bits : 15 - 15 (1 bit)

OC3M_3 : Output compare 3 mode
bits : 16 - 16 (1 bit)

OC4M_bit3 : Output Compare 4 mode - bit 3
bits : 24 - 24 (1 bit)


TIM1_CCMR2_Input (CCMR2_Input)

TIM1 capture/compare mode register 2 [alternate]
address_offset : 0x1C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
alternate_register : TIM1_CCMR2_Output
reset_Mask : 0x0

TIM1_CCMR2_Input TIM1_CCMR2_Input read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CC3S IC3PSC IC3F CC4S IC4PSC IC4F

CC3S : Capture/compare 3 selection This bit-field defines the direction of the channel (input/output) as well as the used input. Note: CC3S bits are writable only when the channel is OFF (CC3E = '0’ in TIMx_CCER).
bits : 0 - 1 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC3 channel is configured as output

0x1 : B_0x1

CC3 channel is configured as input, tim_ic3 is mapped on tim_ti3

0x2 : B_0x2

CC3 channel is configured as input, tim_ic3 is mapped on tim_ti4

0x3 : B_0x3

CC3 channel is configured as input, tim_ic3 is mapped on tim_trc. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register)

End of enumeration elements list.

IC3PSC : Input capture 3 prescaler
bits : 2 - 3 (2 bit)
access : read-write

IC3F : Input capture 3 filter
bits : 4 - 7 (4 bit)
access : read-write

CC4S : Capture/compare 4 selection This bit-field defines the direction of the channel (input/output) as well as the used input. Note: CC4S bits are writable only when the channel is OFF (CC4E = '0’ in TIMx_CCER).
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC4 channel is configured as output

0x1 : B_0x1

CC4 channel is configured as input, tim_ic4 is mapped on tim_ti4

0x2 : B_0x2

CC4 channel is configured as input, tim_ic4 is mapped on tim_ti3

0x3 : B_0x3

CC4 channel is configured as input, tim_ic4 is mapped on tim_trc. This mode is working only if an internal trigger input is selected through TS bit (TIMx_SMCR register)

End of enumeration elements list.

IC4PSC : Input capture 4 prescaler
bits : 10 - 11 (2 bit)
access : read-write

IC4F : Input capture 4 filter
bits : 12 - 15 (4 bit)
access : read-write


TIM1_CCER (CCER)

TIM1 capture/compare enable register
address_offset : 0x20 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCER TIM1_CCER read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CC1E CC1P CC1NE CC1NP CC2E CC2P CC2NE CC2NP CC3E CC3P CC3NE CC3NP CC4E CC4P CC4NE CC4NP CC5E CC5P CC6E CC6P

CC1E : Capture/compare 1 output enable When CC1 channel is configured as output, the OC1 level depends on MOE, OSSI, OSSR, OIS1, OIS1N and CC1NE bits, regardless of the CC1E bits state. Refer to for details. Note: On channels having a complementary output, this bit is preloaded. If the CCPC bit is set in the TIMx_CR2 register then the CC1E active bit takes the new value from the preloaded bit only when a Commutation event is generated.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Capture mode disabled / OC1 is not active (see below)

0x1 : B_0x1

Capture mode enabled / OC1 signal is output on the corresponding output pin

End of enumeration elements list.

CC1P : Capture/compare 1 output polarity When CC1 channel is configured as input, both CC1NP/CC1P bits select the active polarity of TI1FP1 and TI2FP1 for trigger or capture operations. CC1NP=0, CC1P=0: non-inverted/rising edge. The circuit is sensitive to TIxFP1 rising edge (capture or trigger operations in reset, external clock or trigger mode), TIxFP1 is not inverted (trigger operation in gated mode or encoder mode). CC1NP=0, CC1P=1: inverted/falling edge. The circuit is sensitive to TIxFP1 falling edge (capture or trigger operations in reset, external clock or trigger mode), TIxFP1 is inverted (trigger operation in gated mode or encoder mode). CC1NP=1, CC1P=1: non-inverted/both edges/ The circuit is sensitive to both TIxFP1 rising and falling edges (capture or trigger operations in reset, external clock or trigger mode), TIxFP1is not inverted (trigger operation in gated mode). This configuration must not be used in encoder mode. CC1NP=1, CC1P=0: the configuration is reserved, it must not be used. Note: This bit is not writable as soon as LOCK level 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register). Note: On channels having a complementary output, this bit is preloaded. If the CCPC bit is set in the TIMx_CR2 register then the CC1P active bit takes the new value from the preloaded bit only when a Commutation event is generated.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

OC1 active high (output mode) / Edge sensitivity selection (input mode, see below)

0x1 : B_0x1

OC1 active low (output mode) / Edge sensitivity selection (input mode, see below)

End of enumeration elements list.

CC1NE : Capture/compare 1 complementary output enable Note: On channels having a complementary output, this bit is preloaded. If the CCPC bit is set in the TIMx_CR2 register then the CC1NE active bit takes the new value from the preloaded bit only when a Commutation event is generated.
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Off - tim_oc1n is not active. tim_oc1n level is then function of MOE, OSSI, OSSR, OIS1, OIS1N and CC1E bits.

0x1 : B_0x1

On - tim_oc1n signal is output on the corresponding output pin depending on MOE, OSSI, OSSR, OIS1, OIS1N and CC1E bits.

End of enumeration elements list.

CC1NP : Capture/compare 1 complementary output polarity CC1 channel configured as output: CC1 channel configured as input: This bit is used in conjunction with CC1P to define the polarity of tim_ti1fp1 and tim_ti2fp1. Refer to CC1P description. Note: This bit is not writable as soon as LOCK level 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register) and CC1S=”00” (channel configured as output). Note: On channels having a complementary output, this bit is preloaded. If the CCPC bit is set in the TIMx_CR2 register then the CC1NP active bit takes the new value from the preloaded bit only when a Commutation event is generated.
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_oc1n active high.

0x1 : B_0x1

tim_oc1n active low.

End of enumeration elements list.

CC2E : Capture/compare 2 output enable Refer to CC1E description
bits : 4 - 4 (1 bit)
access : read-write

CC2P : Capture/compare 2 output polarity Refer to CC1P description
bits : 5 - 5 (1 bit)
access : read-write

CC2NE : Capture/compare 2 complementary output enable Refer to CC1NE description
bits : 6 - 6 (1 bit)
access : read-write

CC2NP : Capture/compare 2 complementary output polarity Refer to CC1NP description
bits : 7 - 7 (1 bit)
access : read-write

CC3E : Capture/compare 3 output enable Refer to CC1E description
bits : 8 - 8 (1 bit)
access : read-write

CC3P : Capture/compare 3 output polarity Refer to CC1P description
bits : 9 - 9 (1 bit)
access : read-write

CC3NE : Capture/compare 3 complementary output enable Refer to CC1NE description
bits : 10 - 10 (1 bit)
access : read-write

CC3NP : Capture/compare 3 complementary output polarity Refer to CC1NP description
bits : 11 - 11 (1 bit)
access : read-write

CC4E : Capture/compare 4 output enable Refer to CC1E description
bits : 12 - 12 (1 bit)
access : read-write

CC4P : Capture/compare 4 output polarity Refer to CC1P description
bits : 13 - 13 (1 bit)
access : read-write

CC4NE : Capture/compare 4 complementary output enable Refer to CC1NE description
bits : 14 - 14 (1 bit)
access : read-write

CC4NP : Capture/compare 4 complementary output polarity Refer to CC1NP description
bits : 15 - 15 (1 bit)
access : read-write

CC5E : Capture/compare 5 output enable Refer to CC1E description
bits : 16 - 16 (1 bit)
access : read-write

CC5P : Capture/compare 5 output polarity Refer to CC1P description
bits : 17 - 17 (1 bit)
access : read-write

CC6E : Capture/compare 6 output enable Refer to CC1E description
bits : 20 - 20 (1 bit)
access : read-write

CC6P : Capture/compare 6 output polarity Refer to CC1P description
bits : 21 - 21 (1 bit)
access : read-write


TIM1_CNT (CNT)

TIM1 counter
address_offset : 0x24 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CNT TIM1_CNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CNT UIFCPY

CNT : Counter value Non-dithering mode (DITHEN = 0) The register holds the counter value. Dithering mode (DITHEN = 1) The register only holds the non-dithered part in CNT[15:0]. The fractional part is not available.
bits : 0 - 15 (16 bit)
access : read-write

UIFCPY : UIF copy This bit is a read-only copy of the UIF bit of the TIMx_ISR register. If the UIFREMAP bit in the TIMxCR1 is reset, bit 31 is reserved and read at 0.
bits : 31 - 31 (1 bit)
access : read-only


TIM1_PSC (PSC)

TIM1 prescaler
address_offset : 0x28 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_PSC TIM1_PSC read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PSC

PSC : Prescaler value The counter clock frequency (ftim_cnt_ck) is equal to ftim_psc_ck / (PSC[15:0] + 1). PSC contains the value to be loaded in the active prescaler register at each update event (including when the counter is cleared through UG bit of TIMx_EGR register or through trigger controller when configured in “reset mode”).
bits : 0 - 15 (16 bit)
access : read-write


TIM1_ARR (ARR)

TIM1 auto-reload register
address_offset : 0x2C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_ARR TIM1_ARR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ARR

ARR : Auto-reload value ARR is the value to be loaded in the actual auto-reload register. Refer to the for more details about ARR update and behavior. The counter is blocked while the auto-reload value is null. Non-dithering mode (DITHEN = 0) The register holds the auto-reload value. Dithering mode (DITHEN = 1) The register holds the integer part in ARR[19:4]. The ARR[3:0] bitfield contains the dithered part.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_RCR (RCR)

TIM1 repetition counter register
address_offset : 0x30 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_RCR TIM1_RCR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 REP

REP : Repetition counter reload value This bitfield defines the update rate of the compare registers (i.e. periodic transfers from preload to active registers) when preload registers are enable. It also defines the update interrupt generation rate, if this interrupt is enable. When the repetition down-counter reaches zero, an update event is generated and it restarts counting from REP value. As the repetition counter is reloaded with REP value only at the repetition update event UEV, any write to the TIMx_RCR register is not taken in account until the next repetition update event. It means in PWM mode (REP+1) corresponds to: the number of PWM periods in edge-aligned mode the number of half PWM period in center-aligned mode.
bits : 0 - 15 (16 bit)
access : read-write


TIM1_CCR1 (CCR1)

TIM1 capture/compare register 1
address_offset : 0x34 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR1 TIM1_CCR1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR1

CCR1 : Capture/compare 1 value If channel CC1 is configured as output: CCR1 is the value to be loaded in the actual capture/compare 1 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR1 register (bit OC1PE). Else the preload value is copied in the active capture/compare 1 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signaled on tim_oc1 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR1[15:0]. The CCR1[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR1[19:4]. The CCR1[3:0] bitfield contains the dithered part. If channel CC1 is configured as input: CR1 is the counter value transferred by the last input capture 1 event (tim_ic1). The TIMx_CCR1 register is read-only and cannot be programmed. Non-dithering mode (DITHEN = 0) The register holds the capture value in CCR1[15:0]. The CCR1[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the capture in CCR1[19:4]. The CCR1[3:0] bits are reset.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_CCR2 (CCR2)

TIM1 capture/compare register 2
address_offset : 0x38 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR2 TIM1_CCR2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR2

CCR2 : Capture/compare 2 value If channel CC2 is configured as output: CCR2 is the value to be loaded in the actual capture/compare 2 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR1 register (bit OC2PE). Else the preload value is copied in the active capture/compare 2 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signaled on tim_oc2 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR2[15:0]. The CCR2[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR2[19:4]. The CCR2[3:0] bitfield contains the dithered part. If channel CC2 is configured as input: CCR2 is the counter value transferred by the last input capture 2 event (tim_ic2). The TIMx_CCR2 register is read-only and cannot be programmed. Non-dithering mode (DITHEN = 0) The register holds the capture value in CCR2[15:0]. The CCR2[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the capture in CCR2[19:4]. The CCR2[3:0] bits are reset.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_CCR3 (CCR3)

TIM1 capture/compare register 3
address_offset : 0x3C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR3 TIM1_CCR3 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR3

CCR3 : Capture/compare value If channel CC3 is configured as output: CCR3 is the value to be loaded in the actual capture/compare 3 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR2 register (bit OC3PE). Else the preload value is copied in the active capture/compare 3 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signaled on tim_oc3 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR3[15:0]. The CCR3[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR3[19:4]. The CCR3[3:0] bitfield contains the dithered part. If channel CC3 is configured as input: CCR3 is the counter value transferred by the last input capture 3 event (tim_ic3). The TIMx_CCR3 register is read-only and cannot be programmed. Non-dithering mode (DITHEN = 0) The register holds the capture value in CCR3[15:0]. The CCR3[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the capture in CCR3[19:4]. The CCR3[3:0] bits are reset.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_DCR (DCR)

TIM1 DMA control register
address_offset : 0x3DC Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_DCR TIM1_DCR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DBA DBL DBSS

DBA : DMA base address This 5-bits vector defines the base-address for DMA transfers (when read/write access are done through the TIMx_DMAR address). DBA is defined as an offset starting from the address of the TIMx_CR1 register. Example: ...
bits : 0 - 4 (5 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_CR1

0x1 : B_0x1

TIMx_CR2

0x2 : B_0x2

TIMx_SMCR

End of enumeration elements list.

DBL : DMA burst length This 5-bit vector defines the length of DMA transfers (the timer recognizes a burst transfer when a read or a write access is done to the TIMx_DMAR address), i.e. the number of transfers. Transfers can be in half-words or in bytes (see example below). ... Example: Let us consider the following transfer: DBL = 7 bytes and DBA = TIM2_CR1. If DBL = 7 bytes and DBA = TIM2_CR1 represents the address of the byte to be transferred, the address of the transfer should be given by the following equation: (TIMx_CR1 address) + DBA + (DMA index), where DMA index = DBL In this example, 7 bytes are added to (TIMx_CR1 address) + DBA, which gives us the address from/to which the data are copied. In this case, the transfer is done to 7 registers starting from the following address: (TIMx_CR1 address) + DBA According to the configuration of the DMA Data Size, several cases may occur: If the DMA Data Size is configured in half-words, 16-bit data are transferred to each of the 7 registers. If the DMA Data Size is configured in bytes, the data are also transferred to 7 registers: the first register contains the first MSB byte, the second register, the first LSB byte and so on. So with the transfer Timer, one also has to specify the size of data transferred by DMA.
bits : 8 - 12 (5 bit)
access : read-write

Enumeration:

0x0 : B_0x0

1 transfer

0x1 : B_0x1

2 transfers

0x2 : B_0x2

3 transfers

0x1A : B_0x1A

26 transfers

End of enumeration elements list.

DBSS : DMA burst source selection This bitfield defines the interrupt source that triggers the DMA burst transfers (the timer recognizes a burst transfer when a read or a write access is done to the TIMx_DMAR address). Others: reserved
bits : 16 - 19 (4 bit)
access : read-write

Enumeration:

0x1 : B_0x1

Update

0x2 : B_0x2

CC1

0x3 : B_0x3

CC2

0x4 : B_0x4

CC3

0x5 : B_0x5

CC4

0x6 : B_0x6

COM

0x7 : B_0x7

Trigger

End of enumeration elements list.


TIM1_DMAR (DMAR)

TIM1 DMA address for full transfer
address_offset : 0x3E0 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_DMAR TIM1_DMAR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DMAB

DMAB : DMA register for burst accesses A read or write operation to the DMAR register accesses the register located at the address (TIMx_CR1 address) + (DBA + DMA index) x 4 where TIMx_CR1 address is the address of the control register 1, DBA is the DMA base address configured in TIMx_DCR register, DMA index is automatically controlled by the DMA transfer, and ranges from 0 to DBL (DBL configured in TIMx_DCR).
bits : 0 - 31 (32 bit)
access : read-write


TIM1_CR2 (CR2)

control register 2
address_offset : 0x4 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CR2 TIM1_CR2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCPC CCUS CCDS MMS0_2 TI1S OIS1 OIS1N OIS2 OIS2N OIS3 OIS3N OIS4 OIS4N OIS5 OIS6 MMS2 MMS_3

CCPC : Capture/compare preloaded control
bits : 0 - 0 (1 bit)

CCUS : Capture/compare control update selection
bits : 2 - 2 (1 bit)

CCDS : Capture/compare DMA selection
bits : 3 - 3 (1 bit)

MMS0_2 : Master mode selection
bits : 4 - 6 (3 bit)

TI1S : TI1 selection
bits : 7 - 7 (1 bit)

OIS1 : Output Idle state 1
bits : 8 - 8 (1 bit)

OIS1N : Output Idle state 1
bits : 9 - 9 (1 bit)

OIS2 : Output Idle state 2
bits : 10 - 10 (1 bit)

OIS2N : Output Idle state 2
bits : 11 - 11 (1 bit)

OIS3 : Output Idle state 3
bits : 12 - 12 (1 bit)

OIS3N : Output Idle state 3
bits : 13 - 13 (1 bit)

OIS4 : Output Idle state 4
bits : 14 - 14 (1 bit)

OIS4N : Output Idle state 4 (OC5 output)
bits : 15 - 15 (1 bit)

OIS5 : Output Idle state 5
bits : 16 - 16 (1 bit)

OIS6 : Output Idle state 6
bits : 18 - 18 (1 bit)

MMS2 : Master mode selection 2
bits : 20 - 23 (4 bit)

MMS_3 : Master mode selection 2
bits : 25 - 25 (1 bit)


TIM1_CCR4 (CCR4)

TIM1 capture/compare register 4
address_offset : 0x40 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR4 TIM1_CCR4 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR4

CCR4 : Capture/compare value If channel CC4 is configured as output: CCR4 is the value to be loaded in the actual capture/compare 4 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR2 register (bit OC4PE). Else the preload value is copied in the active capture/compare 4 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signalled on tim_oc4 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR4[15:0]. The CCR4[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR4[19:4]. The CCR4[3:0] bitfield contains the dithered part. If channel CC4 is configured as input: CCR4 is the counter value transferred by the last input capture 4 event (tim_ic4). The TIMx_CCR4 register is read-only and cannot be programmed. Non-dithering mode (DITHEN = 0) The register holds the capture value in CCR4[15:0]. The CCR4[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the capture in CCR4[19:4]. The CCR4[3:0] bits are reset.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_BDTR (BDTR)

TIM1 break and dead-time register
address_offset : 0x44 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_BDTR TIM1_BDTR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DTG LOCK OSSI OSSR BKE BKP AOE MOE BKF BK2F BK2E BK2P BKDSRM BK2DSRM BKBID BK2BID

DTG : Dead-time generator setup This bit-field defines the duration of the dead-time inserted between the complementary outputs. DT correspond to this duration. DTG[7:5]=0xx => DT=DTG[7:0]x tdtg with tdtg=tDTS. DTG[7:5]=10x => DT=(64+DTG[5:0])xtdtg with Tdtg=2xtDTS. DTG[7:5]=110 => DT=(32+DTG[4:0])xtdtg with Tdtg=8xtDTS. DTG[7:5]=111 => DT=(32+DTG[4:0])xtdtg with Tdtg=16xtDTS. Example if TDTS=125ns (8MHz), dead-time possible values are: 0 to 15875 ns by 125 ns steps, 16 us to 31750 ns by 250 ns steps, 32 us to 63us by 1 us steps, 64 us to 126 us by 2 us steps Note: This bit-field can not be modified as long as LOCK level 1, 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 0 - 7 (8 bit)
access : read-write

LOCK : Lock configuration These bits offer a write protection against software errors. Note: The LOCK bits can be written only once after the reset. Once the TIMx_BDTR register has been written, their content is frozen until the next reset.
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

LOCK OFF - No bit is write protected.

0x1 : B_0x1

LOCK Level 1 = DTG bits in TIMx_BDTR register, OISx and OISxN bits in TIMx_CR2 register and BKBID/BK2BID/BKE/BKP/AOE bits in TIMx_BDTR register can no longer be written.

0x2 : B_0x2

LOCK Level 2 = LOCK Level 1 + CC Polarity bits (CCxP/CCxNP bits in TIMx_CCER register, as long as the related channel is configured in output through the CCxS bits) as well as OSSR and OSSI bits can no longer be written.

0x3 : B_0x3

LOCK Level 3 = LOCK Level 2 + CC Control bits (OCxM and OCxPE bits in TIMx_CCMRx registers, as long as the related channel is configured in output through the CCxS bits) can no longer be written.

End of enumeration elements list.

OSSI : Off-state selection for idle mode This bit is used when MOE=0 due to a break event or by a software write, on channels configured as outputs. See OC/OCN enable description for more details (enable register (TIMx_CCER)(x = 1, 8)). Note: This bit can not be modified as soon as the LOCK level 2 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

When inactive, OC/OCN outputs are disabled (the timer releases the output control which is taken over by the GPIO logic and which imposes a Hi-Z state).

0x1 : B_0x1

When inactive, OC/OCN outputs are first forced with their inactive level then forced to their idle level after the deadtime. The timer maintains its control over the output.

End of enumeration elements list.

OSSR : Off-state selection for Run mode This bit is used when MOE=1 on channels having a complementary output which are configured as outputs. OSSR is not implemented if no complementary output is implemented in the timer. See OC/OCN enable description for more details (enable register (TIMx_CCER)(x = 1, 8)). Note: This bit can not be modified as soon as the LOCK level 2 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

When inactive, OC/OCN outputs are disabled (the timer releases the output control which is taken over by the GPIO logic, which forces a Hi-Z state).

0x1 : B_0x1

When inactive, OC/OCN outputs are enabled with their inactive level as soon as CCxE=1 or CCxNE=1 (the output is still controlled by the timer).

End of enumeration elements list.

BKE : Break enable This bit enables the complete break protection (including all sources connected to bk_acth and BKIN sources, as per ). Note: This bit cannot be modified when LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register). Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break function disabled

0x1 : B_0x1

Break function enabled

End of enumeration elements list.

BKP : Break polarity Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register). Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break input tim_brk is active low

0x1 : B_0x1

Break input tim_brk is active high

End of enumeration elements list.

AOE : Automatic output enable Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 14 - 14 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

MOE can be set only by software

0x1 : B_0x1

MOE can be set by software or automatically at the next update event (if none of the break inputs tim_brk and tim_brk2 is active)

End of enumeration elements list.

MOE : Main output enable This bit is cleared asynchronously by hardware as soon as one of the break inputs is active (tim_brk or tim_brk2). It is set by software or automatically depending on the AOE bit. It is acting only on the channels which are configured in output. In response to a break event or if MOE is written to 0: OC and OCN outputs are disabled or forced to idle state depending on the OSSI bit. enable register (TIMx_CCER)(x = 1, 8)).
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

In response to a break 2 event. OC and OCN outputs are disabled

0x1 : B_0x1

OC and OCN outputs are enabled if their respective enable bits are set (CCxE, CCxNE in TIMx_CCER register).See OC/OCN enable description for more details (

End of enumeration elements list.

BKF : Break filter This bit-field defines the frequency used to sample tim_brk input and the length of the digital filter applied to tim_brk. The digital filter is made of an event counter in which N consecutive events are needed to validate a transition on the output: Note: This bit cannot be modified when LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 16 - 19 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No filter, tim_brk acts asynchronously

0x1 : B_0x1

fSAMPLING=ftim_ker_ck, N=2

0x2 : B_0x2

fSAMPLING=ftim_ker_ck, N=4

0x3 : B_0x3

fSAMPLING=ftim_ker_ck, N=8

0x4 : B_0x4

fSAMPLING=fDTS/2, N=6

0x5 : B_0x5

fSAMPLING=fDTS/2, N=8

0x6 : B_0x6

fSAMPLING=fDTS/4, N=6

0x7 : B_0x7

fSAMPLING=fDTS/4, N=8

0x8 : B_0x8

fSAMPLING=fDTS/8, N=6

0x9 : B_0x9

fSAMPLING=fDTS/8, N=8

0xA : B_0xA

fSAMPLING=fDTS/16, N=5

0xB : B_0xB

fSAMPLING=fDTS/16, N=6

0xC : B_0xC

fSAMPLING=fDTS/16, N=8

0xD : B_0xD

fSAMPLING=fDTS/32, N=5

0xE : B_0xE

fSAMPLING=fDTS/32, N=6

0xF : B_0xF

fSAMPLING=fDTS/32, N=8

End of enumeration elements list.

BK2F : Break 2 filter This bit-field defines the frequency used to sample tim_brk2 input and the length of the digital filter applied to tim_brk2. The digital filter is made of an event counter in which N consecutive events are needed to validate a transition on the output: Note: This bit cannot be modified when LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 20 - 23 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No filter, tim_brk2 acts asynchronously

0x1 : B_0x1

fSAMPLING=ftim_ker_ck, N=2

0x2 : B_0x2

fSAMPLING=ftim_ker_ck, N=4

0x3 : B_0x3

fSAMPLING=ftim_ker_ck, N=8

0x4 : B_0x4

fSAMPLING=fDTS/2, N=6

0x5 : B_0x5

fSAMPLING=fDTS/2, N=8

0x6 : B_0x6

fSAMPLING=fDTS/4, N=6

0x7 : B_0x7

fSAMPLING=fDTS/4, N=8

0x8 : B_0x8

fSAMPLING=fDTS/8, N=6

0x9 : B_0x9

fSAMPLING=fDTS/8, N=8

0xA : B_0xA

fSAMPLING=fDTS/16, N=5

0xB : B_0xB

fSAMPLING=fDTS/16, N=6

0xC : B_0xC

fSAMPLING=fDTS/16, N=8

0xD : B_0xD

fSAMPLING=fDTS/32, N=5

0xE : B_0xE

fSAMPLING=fDTS/32, N=6

0xF : B_0xF

fSAMPLING=fDTS/32, N=8

End of enumeration elements list.

BK2E : Break 2 enable This bit enables the complete break 2 protection (including all sources connected to bk_acth and BKIN sources, as per ). Note: The BRKIN2 must only be used with OSSR = OSSI = 1. Note: This bit cannot be modified when LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register). Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 24 - 24 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break2 function disabled

0x1 : B_0x1

Break2 function enabled

End of enumeration elements list.

BK2P : Break 2 polarity Note: This bit cannot be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register). Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 25 - 25 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break input tim_brk2 is active low

0x1 : B_0x1

Break input tim_brk2 is active high

End of enumeration elements list.

BKDSRM : Break disarm This bit is cleared by hardware when no break source is active. The BKDSRM bit must be set by software to release the bidirectional output control (open-drain output in Hi-Z state) and then be polled it until it is reset by hardware, indicating that the fault condition has disappeared. Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 26 - 26 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break input tim_brk is armed

0x1 : B_0x1

Break input tim_brk is disarmed

End of enumeration elements list.

BK2DSRM : Break2 disarm Refer to BKDSRM description
bits : 27 - 27 (1 bit)
access : read-write

BKBID : Break bidirectional In the bidirectional mode (BKBID bit set to 1), the break input is configured both in input mode and in open drain output mode. Any active break event asserts a low logic level on the Break input to indicate an internal break event to external devices. Note: This bit cannot be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register). Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective.
bits : 28 - 28 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break input tim_brk in input mode

0x1 : B_0x1

Break input tim_brk in bidirectional mode

End of enumeration elements list.

BK2BID : Break2 bidirectional Refer to BKBID description
bits : 29 - 29 (1 bit)
access : read-write


TIM1_CCR5 (CCR5)

TIM1 capture/compare register 5
address_offset : 0x48 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR5 TIM1_CCR5 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR5 GC5C1 GC5C2 GC5C3

CCR5 : Capture/compare 5 value CCR5 is the value to be loaded in the actual capture/compare 5 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR3 register (bit OC5PE). Else the preload value is copied in the active capture/compare 5 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signaled on tim_oc5 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR5[15:0]. The CCR5[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR5[19:4]. The CCR5[3:0] bitfield contains the dithered part.
bits : 0 - 19 (20 bit)
access : read-write

GC5C1 : Group channel 5 and channel 1 Distortion on channel 1 output: This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR1). Note: it is also possible to apply this distortion on combined PWM signals.
bits : 29 - 29 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No effect of oc5ref on oc1refc

0x1 : B_0x1

oc1refc is the logical AND of oc1ref and oc5ref

End of enumeration elements list.

GC5C2 : Group channel 5 and channel 2 Distortion on channel 2 output: This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR1). Note: it is also possible to apply this distortion on combined PWM signals.
bits : 30 - 30 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No effect of tim_oc5ref on tim_oc2refc

0x1 : B_0x1

tim_oc2refc is the logical AND of tim_oc2ref and tim_oc5ref

End of enumeration elements list.

GC5C3 : Group channel 5 and channel 3 Distortion on channel 3 output: This bit can either have immediate effect or be preloaded and taken into account after an update event (if preload feature is selected in TIMxCCMR2). Note: it is also possible to apply this distortion on combined PWM signals.
bits : 31 - 31 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No effect of tim_oc5ref on tim_oc3refc

0x1 : B_0x1

tim_oc3refc is the logical AND of tim_oc3ref and tim_oc5ref

End of enumeration elements list.


TIM1_CCR6 (CCR6)

TIM1 capture/compare register 6
address_offset : 0x4C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCR6 TIM1_CCR6 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CCR6

CCR6 : Capture/compare 6 value CCR6 is the value to be loaded in the actual capture/compare 6 register (preload value). It is loaded permanently if the preload feature is not selected in the TIMx_CCMR3 register (bit OC6PE). Else the preload value is copied in the active capture/compare 6 register when an update event occurs. The active capture/compare register contains the value to be compared to the counter TIMx_CNT and signaled on tim_oc6 output. Non-dithering mode (DITHEN = 0) The register holds the compare value in CCR6[15:0]. The CCR6[19:16] bits are reset. Dithering mode (DITHEN = 1) The register holds the integer part in CCR6[19:4]. The CCR6[3:0] bitfield contains the dithered part.
bits : 0 - 19 (20 bit)
access : read-write


TIM1_CCMR3 (CCMR3)

TIM1 capture/compare mode register 3
address_offset : 0x50 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_CCMR3 TIM1_CCMR3 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OC5FE OC5PE OC5M1 OC5CE OC6FE OC6PE OC6M1 OC6CE OC5M2 OC6M2

OC5FE : Output compare 5 fast enable
bits : 2 - 2 (1 bit)
access : read-write

OC5PE : Output compare 5 preload enable
bits : 3 - 3 (1 bit)
access : read-write

OC5M1 : Output compare 5 mode
bits : 4 - 6 (3 bit)
access : read-write

OC5CE : Output compare 5 clear enable
bits : 7 - 7 (1 bit)
access : read-write

OC6FE : Output compare 6 fast enable
bits : 10 - 10 (1 bit)
access : read-write

OC6PE : Output compare 6 preload enable
bits : 11 - 11 (1 bit)
access : read-write

OC6M1 : Output compare 6 mode
bits : 12 - 14 (3 bit)
access : read-write

OC6CE : Output compare 6 clear enable
bits : 15 - 15 (1 bit)
access : read-write

OC5M2 : Output compare 5 mode
bits : 16 - 16 (1 bit)
access : read-write

OC6M2 : Output compare 6 mode
bits : 24 - 24 (1 bit)
access : read-write


TIM1_DTR2 (DTR2)

TIM1 timer deadtime register 2
address_offset : 0x54 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_DTR2 TIM1_DTR2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DTGF DTAE DTPE

DTGF : Dead-time falling edge generator setup This bit-field defines the duration of the dead-time inserted between the complementary outputs, on the falling edge. DTGF[7:5]=0xx => DTF=DTGF[7:0]x tdtg with tdtg=tDTS. DTGF[7:5]=10x => DTF=(64+DTGF[5:0])xtdtg with Tdtg=2xtDTS. DTGF[7:5]=110 => DTF=(32+DTGF[4:0])xtdtg with Tdtg=8xtDTS. DTGF[7:5]=111 => DTF=(32+DTGF[4:0])xtdtg with Tdtg=16xtDTS. Example if TDTS=125ns (8MHz), dead-time possible values are: 0 to 15875 ns by 125 ns steps, 16 us to 31750 ns by 250 ns steps, 32 us to 63us by 1 us steps, 64 us to 126 us by 2 us steps Note: This bit-field can not be modified as long as LOCK level 1, 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 0 - 7 (8 bit)
access : read-write

DTAE : Deadtime asymmetric enable Note: This bit can not be modified as long as LOCK level 1, 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Deadtime on rising and falling edges are identical, and defined with DTG[7:0] register

0x1 : B_0x1

Deadtime on rising edge is defined with DTG[7:0] register and deadtime on falling edge is defined with DTGF[7:0] bits.

End of enumeration elements list.

DTPE : Deadtime preload enable Note: This bit can not be modified as long as LOCK level 1, 2 or 3 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 17 - 17 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Deadtime value is not preloaded

0x1 : B_0x1

Deadtime value preload is enabled

End of enumeration elements list.


TIM1_ECR (ECR)

TIM1 timer encoder control register
address_offset : 0x58 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_ECR TIM1_ECR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IE IDIR IBLK FIDX IPOS PW PWPRSC

IE : Index enable This bit indicates if the Index event resets the counter.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index disabled

0x1 : B_0x1

Index enabled

End of enumeration elements list.

IDIR : Index direction This bit indicates in which direction the Index event resets the counter. Note: The IDR[1:0] bitfield must be written when IE bit is reset (index disabled).
bits : 1 - 2 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index resets the counter whatever the direction

0x1 : B_0x1

Index resets the counter when up-counting only

0x2 : B_0x2

Index resets the counter when down-counting only

End of enumeration elements list.

IBLK : Index blanking This bit indicates if the Index event is conditioned by the tim_ti3 input
bits : 3 - 4 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index always active

0x1 : B_0x1

Index disabled hen tim_ti3 input is active, as per CC3P bitfield

0x2 : B_0x2

Index disabled when tim_ti4 input is active, as per CC4P bitfield

End of enumeration elements list.

FIDX : First index This bit indicates if the first index only is taken into account
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index is always active

0x1 : B_0x1

the first Index only resets the counter

End of enumeration elements list.

IPOS : Index positioning In quadrature encoder mode (SMS[3:0] = 0001, 0010, 0011, 1110, 1111), this bit indicates in which AB input configuration the Index event resets the counter. In directional clock mode or clock plus direction mode (SMS[3:0] = 1010, 1011, 1100, 1101), these bits indicates on which level the Index event resets the counter. In bidirectional clock mode, this applies for both clock inputs. x0: Index resets the counter when clock is 0 x1: Index resets the counter when clock is 1 Note: IPOS[1] bit is not significant
bits : 6 - 7 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index resets the counter when AB = 00

0x1 : B_0x1

Index resets the counter when AB = 01

0x2 : B_0x2

Index resets the counter when AB = 10

0x3 : B_0x3

Index resets the counter when AB = 11

End of enumeration elements list.

PW : Pulse width This bitfield defines the pulse duration, as following: tPW = PW[7:0] x tPWG
bits : 16 - 23 (8 bit)
access : read-write

PWPRSC : Pulse width prescaler This bitfield sets the clock prescaler for the pulse generator, as following: tPWG = (2(PWPRSC[2:0])) x ttim_ker_ck
bits : 24 - 26 (3 bit)
access : read-write


TIM1_TISEL (TISEL)

TIM1 timer input selection register
address_offset : 0x5C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_TISEL TIM1_TISEL read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TI1SEL TI2SEL TI3SEL TI4SEL

TI1SEL : Selects tim_ti1[0..15] input ... Refer to for interconnects list.
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ti1_in0: TIMx_CH1

0x1 : B_0x1

tim_ti1_in1

0xF : B_0xF

tim_ti1_in15

End of enumeration elements list.

TI2SEL : Selects tim_ti2[0..15] input ... Refer to for interconnects list.
bits : 8 - 11 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ti2_in0: TIMx_CH2

0x1 : B_0x1

tim_ti2_in1

0xF : B_0xF

tim_ti2_in15

End of enumeration elements list.

TI3SEL : Selects tim_ti3[0..15] input ... Refer to for interconnects list.
bits : 16 - 19 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ti3_in0: TIMx_CH2

0x1 : B_0x1

tim_ti3_in1

0xF : B_0xF

tim_ti3_in15

End of enumeration elements list.

TI4SEL : Selects tim_ti4[0..15] input ... Refer to for interconnects list.
bits : 24 - 27 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ti4_in0: TIMx_CH4

0x1 : B_0x1

tim_ti4_in1

0xF : B_0xF

tim_ti4_in15

End of enumeration elements list.


TIM1_AF1 (AF1)

TIM1 alternate function option register 1
address_offset : 0x60 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_AF1 TIM1_AF1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BKINE BKCMP1E BKCMP2E BKCMP3E BKCMP4E BKCMP5E BKCMP6E BKCMP7E BKCMP8E BKINP BKCMP1P BKCMP2P BKCMP3P BKCMP4P ETRSEL

BKINE : TIMx_BKIN input enable This bit enables the TIMx_BKIN alternate function input for the timer’s tim_brk input. TIMx_BKIN input is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_BKIN input disabled

0x1 : B_0x1

TIMx_BKIN input enabled

End of enumeration elements list.

BKCMP1E : tim_brk_cmp1 enable This bit enables the tim_brk_cmp1 for the timer’s tim_brk input. tim_brk_cmp1 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp1 input disabled

0x1 : B_0x1

tim_brk_cmp1 input enabled

End of enumeration elements list.

BKCMP2E : tim_brk_cmp2 enable This bit enables the tim_brk_cmp2 for the timer’s tim_brk input. tim_brk_cmp2 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp2 input disabled

0x1 : B_0x1

tim_brk_cmp2 input enabled

End of enumeration elements list.

BKCMP3E : tim_brk_cmp3 enable This bit enables the tim_brk_cmp3 for the timer’s tim_brk input. tim_brk_cmp3 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp3 input disabled

0x1 : B_0x1

tim_brk_cmp3 input enabled

End of enumeration elements list.

BKCMP4E : tim_brk_cmp4 enable This bit enables the tim_brk_cmp4 for the timer’s tim_brk input. tim_brk_cmp4 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp4 input disabled

0x1 : B_0x1

tim_brk_cmp4 input enabled

End of enumeration elements list.

BKCMP5E : tim_brk_cmp5 enable This bit enables the tim_brk_cmp5 for the timer’s tim_brk input. tim_brk_cmp5 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp5 input disabled

0x1 : B_0x1

tim_brk_cmp5 input enabled

End of enumeration elements list.

BKCMP6E : tim_brk_cmp6 enable This bit enables the tim_brk_cmp6 for the timer’s tim_brk input. tim_brk_cmp6 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp6 input disabled

0x1 : B_0x1

tim_brk_cmp6 input enabled

End of enumeration elements list.

BKCMP7E : tim_brk_cmp7 enable This bit enables the tim_brk_cmp7 for the timer’s tim_brk input. tim_brk_cmp7 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp7 input disabled

0x1 : B_0x1

tim_brk_cmp7 input enabled

End of enumeration elements list.

BKCMP8E : tim_brk_cmp8 enable This bit enables the tim_brk_cmp8 for the timer’s tim_brk input. tim_brk_cmp8 output is 'ORed’ with the other tim_brk sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp8 input disabled

0x1 : B_0x1

tim_brk_cmp8 input enabled

End of enumeration elements list.

BKINP : TIMx_BKIN input polarity This bit selects the TIMx_BKIN alternate function input sensitivity. It must be programmed together with the BKP polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_BKIN input polarity is not inverted (active low if BKP = 0, active high if BKP = 1)

0x1 : B_0x1

TIMx_BKIN input polarity is inverted (active high if BKP = 0, active low if BKP = 1)

End of enumeration elements list.

BKCMP1P : tim_brk_cmp1 input polarity This bit selects the tim_brk_cmp1 input sensitivity. It must be programmed together with the BKP polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp1 input polarity is not inverted (active low if BKP = 0, active high if BKP = 1)

0x1 : B_0x1

tim_brk_cmp1 input polarity is inverted (active high if BKP = 0, active low if BKP = 1)

End of enumeration elements list.

BKCMP2P : tim_brk_cmp2 input polarity This bit selects the tim_brk_cmp2 input sensitivity. It must be programmed together with the BKP polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp2 input polarity is not inverted (active low if BKP = 0, active high if BKP = 1)

0x1 : B_0x1

tim_brk_cmp2 input polarity is inverted (active high if BKP = 0, active low if BKP = 1)

End of enumeration elements list.

BKCMP3P : tim_brk_cmp3 input polarity This bit selects the tim_brk_cmp3 input sensitivity. It must be programmed together with the BKP polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp3 input polarity is not inverted (active low if BKP = 0, active high if BKP = 1)

0x1 : B_0x1

tim_brk_cmp3 input polarity is inverted (active high if BKP = 0, active low if BKP = 1)

End of enumeration elements list.

BKCMP4P : tim_brk_cmp4 input polarity This bit selects the tim_brk_cmp4 input sensitivity. It must be programmed together with the BKP polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk_cmp4 input polarity is not inverted (active low if BKP = 0, active high if BKP = 1)

0x1 : B_0x1

tim_brk_cmp4 input polarity is inverted (active high if BKP = 0, active low if BKP = 1)

End of enumeration elements list.

ETRSEL : etr_in source selection These bits select the etr_in input source. ... Refer to for product specific implementation. Note: These bits can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 14 - 17 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_etr0: TIMx_ETR input

0x1 : B_0x1

tim_etr1

0xF : B_0xF

tim_etr15

End of enumeration elements list.


TIM1_AF2 (AF2)

TIM1 alternate function register 2
address_offset : 0x64 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_AF2 TIM1_AF2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 BK2INE BK2CMP1E BK2CMP2E BK2CMP3E BK2CMP4E BK2CMP5E BK2CMP6E BK2CMP7E BK2CMP8E BK2INP BK2CMP1P BK2CMP2P BK2CMP3P BK2CMP4P OCRSEL

BK2INE : TIMx_BKIN2 input enable This bit enables the TIMx_BKIN2 alternate function input for the timer’s tim_brk2 input. TIMx_BKIN2 input is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_BKIN2 input disabled

0x1 : B_0x1

TIMx_BKIN2 input enabled

End of enumeration elements list.

BK2CMP1E : tim_brk2_cmp1 enable This bit enables the tim_brk2_cmp1 for the timer’s tim_brk2 input. tim_brk2_cmp1 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp1 input disabled

0x1 : B_0x1

tim_brk2_cmp1 input enabled

End of enumeration elements list.

BK2CMP2E : tim_brk2_cmp2 enable This bit enables the tim_brk2_cmp2 for the timer’s tim_brk2 input. tim_brk2_cmp2 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp2 input disabled

0x1 : B_0x1

tim_brk2_cmp2 input enabled

End of enumeration elements list.

BK2CMP3E : tim_brk2_cmp3 enable This bit enables the tim_brk2_cmp3 for the timer’s tim_brk2 input. tim_brk2_cmp3 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp3 input disabled

0x1 : B_0x1

tim_brk2_cmp3 input enabled

End of enumeration elements list.

BK2CMP4E : tim_brk2_cmp4 enable This bit enables the tim_brk2_cmp4 for the timer’s tim_brk2 input. tim_brk2_cmp4 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp4 input disabled

0x1 : B_0x1

tim_brk2_cmp4 input enabled

End of enumeration elements list.

BK2CMP5E : tim_brk2_cmp5 enable This bit enables the tim_brk2_cmp5 for the timer’s tim_brk2 input. tim_brk2_cmp5 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp5 input disabled

0x1 : B_0x1

tim_brk2_cmp5 input enabled

End of enumeration elements list.

BK2CMP6E : tim_brk2_cmp6 enable This bit enables the tim_brk2_cmp6 for the timer’s tim_brk2 input. tim_brk2_cmp6 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp6 input disabled

0x1 : B_0x1

tim_brk2_cmp6 input enabled

End of enumeration elements list.

BK2CMP7E : tim_brk2_cmp7 enable This bit enables the tim_brk2_cmp7 for the timer’s tim_brk2 input. tim_brk2_cmp7 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp7 input disabled

0x1 : B_0x1

tim_brk2_cmp7 input enabled

End of enumeration elements list.

BK2CMP8E : tim_brk2_cmp8 enable This bit enables the tim_brk2_cmp8 for the timer’s tim_brk2 input. tim_brk2_cmp8 output is 'ORed’ with the other tim_brk2 sources. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp8 input disabled

0x1 : B_0x1

tim_brk2_cmp8 input enabled

End of enumeration elements list.

BK2INP : TIMx_BKIN2 input polarity This bit selects the TIMx_BKIN2 alternate function input sensitivity. It must be programmed together with the BK2P polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIMx_BKIN2 input polarity is not inverted (active low if BK2P = 0, active high if BK2P = 1)

0x1 : B_0x1

TIMx_BKIN2 input polarity is inverted (active high if BK2P = 0, active low if BK2P = 1)

End of enumeration elements list.

BK2CMP1P : tim_brk2_cmp1 input polarity This bit selects the tim_brk2_cmp1 input sensitivity. It must be programmed together with the BK2P polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp1 input polarity is not inverted (active low if BK2P = 0, active high if BK2P = 1)

0x1 : B_0x1

tim_brk2_cmp1 input polarity is inverted (active high if BK2P = 0, active low if BK2P = 1)

End of enumeration elements list.

BK2CMP2P : tim_brk2_cmp2 input polarity This bit selects the tim_brk2_cmp2 input sensitivity. It must be programmed together with the BK2P polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp2 input polarity is not inverted (active low if BK2P = 0, active high if BK2P = 1)

0x1 : B_0x1

tim_brk2_cmp2 input polarity is inverted (active high if BK2P = 0, active low if BK2P = 1)

End of enumeration elements list.

BK2CMP3P : tim_brk2_cmp3 input polarity This bit selects the tim_brk2_cmp3 input sensitivity. It must be programmed together with the BK2P polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp3 input polarity is not inverted (active low if BK2P = 0, active high if BK2P = 1)

0x1 : B_0x1

tim_brk2_cmp3 input polarity is inverted (active high if BK2P = 0, active low if BK2P = 1)

End of enumeration elements list.

BK2CMP4P : tim_brk2_cmp4 input polarity This bit selects the tim_brk2_cmp4 input sensitivity. It must be programmed together with the BK2P polarity bit. Note: This bit can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_brk2_cmp4 input polarity is not inverted (active low if BK2P = 0, active high if BK2P = 1)

0x1 : B_0x1

tim_brk2_cmp4 input polarity is inverted (active high if BK2P = 0, active low if BK2P = 1)

End of enumeration elements list.

OCRSEL : ocref_clr source selection These bits select the ocref_clr input source. ... Refer to for product specific information. Note: These bits can not be modified as long as LOCK level 1 has been programmed (LOCK bits in TIMx_BDTR register).
bits : 16 - 18 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ocref_clr0

0x1 : B_0x1

tim_ocref_clr1

0x7 : B_0x7

tim_ocref_clr7

End of enumeration elements list.


TIM1_SMCR (SMCR)

TIM1 slave mode control register
address_offset : 0x8 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_SMCR TIM1_SMCR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SMS1 OCCS TS1 MSM ETF ETPS ECE ETP SMS2 TS2 SMSPE SMSPS

SMS1 : Slave mode selection When external signals are selected the active edge of the trigger signal (tim_trgi) is linked to the polarity selected on the external input (see Input Control register and Control Register description. Note: The gated mode must not be used if tim_ti1f_ed is selected as the trigger input (TS=00100). Indeed, tim_ti1f_ed outputs 1 pulse for each transition on TI1F, whereas the gated mode checks the level of the trigger signal. Note: The clock of the slave peripherals (timer, ADC, ...) receiving the tim_trgo or the tim_trgo2 signals must be enabled prior to receive events from the master timer, and the clock frequency (prescaler) must not be changed on-the-fly while triggers are received from the master timer.
bits : 0 - 2 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Slave mode disabled - if CEN = '1’ then the prescaler is clocked directly by the internal clock.

0x1 : B_0x1

Quadrature encoder mode 1, x2 mode- Counter counts up/down on tim_ti1fp1 edge depending on tim_ti2fp2 level.

0x2 : B_0x2

Quadrature encoder mode 2, x2 mode - Counter counts up/down on tim_ti2fp2 edge depending on tim_ti1fp1 level.

0x3 : B_0x3

Quadrature encoder mode 3, x4 mode - Counter counts up/down on both tim_ti1fp1 and tim_ti2fp2 edges depending on the level of the other input.

0x4 : B_0x4

Reset Mode - Rising edge of the selected trigger input (tim_trgi) reinitializes the counter and generates an update of the registers.

0x5 : B_0x5

Gated Mode - The counter clock is enabled when the trigger input (tim_trgi) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled.

0x6 : B_0x6

Trigger Mode - The counter starts at a rising edge of the trigger tim_trgi (but it is not reset). Only the start of the counter is controlled.

0x7 : B_0x7

External Clock Mode 1 - Rising edges of the selected trigger (tim_trgi) clock the counter.

0x8 : B_0x8

Combined reset + trigger mode - Rising edge of the selected trigger input (tim_trgi) reinitializes the counter, generates an update of the registers and starts the counter.

0x9 : B_0x9

Combined gated + reset mode - The counter clock is enabled when the trigger input (tim_trgi) is high. The counter stops and is reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled.

0xA : B_0xA

Encoder mode: Clock plus direction, x2 mode.

0xB : B_0xB

Encoder mode: Clock plus direction, x1 mode, tim_ti2fp2 edge sensitivity is set by CC2P

0xC : B_0xC

Encoder mode: Directional Clock, x2 mode.

0xD : B_0xD

Encoder mode: Directional Clock, x1 mode, tim_ti1fp1 and tim_ti2fp2 edge sensitivity is set by CC1P and CC2P.

0xE : B_0xE

Quadrature encoder mode: x1 mode, counting on tim_ti1fp1 edges only, edge sensitivity is set by CC1P.

0xF : B_0xF

Quadrature encoder mode: x1 mode, counting on tim_ti2fp2 edges only, edge sensitivity is set by CC2P.

End of enumeration elements list.

OCCS : OCREF clear selection This bit is used to select the OCREF clear source.
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_ocref_clr_int is connected to the tim_ocref_clr input

0x1 : B_0x1

tim_ocref_clr_int is connected to tim_etrf

End of enumeration elements list.

TS1 : Trigger selection - bit 4:3 Refer to TS[2:0] description - bits 6:4 null Trigger selection This bitfield is combined with TS[4:3] bits. This bit-field selects the trigger input to be used to synchronize the counter. others: Reserved See for more details on tim_itrx meaning for each Timer. Note: These bits must be changed only when they are not used (e.g. when SMS=000) to avoid wrong edge detections at the transition.
bits : 4 - 6 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Internal Trigger 0 (tim_itr0)

0x1 : B_0x1

Internal Trigger 1 (tim_itr1)

0x2 : B_0x2

Internal Trigger 2 (tim_itr2)

0x3 : B_0x3

Internal Trigger 3 (tim_itr3)

0x4 : B_0x4

tim_ti1 Edge Detector (tim_ti1f_ed)

0x5 : B_0x5

Filtered Timer Input 1 (tim_ti1fp1)

0x6 : B_0x6

Filtered Timer Input 2 (tim_ti2fp2)

0x7 : B_0x7

External Trigger input (tim_etrf)

0x8 : B_0x8

Internal Trigger 0 (tim_itr4)

0x9 : B_0x9

Internal Trigger 1 (tim_itr5)

0xA : B_0xA

Internal Trigger 1 (tim_itr6)

0xB : B_0xB

Internal Trigger 1 (tim_itr7)

0xC : B_0xC

Internal Trigger 1 (tim_itr8)

0xD : B_0xD

Internal Trigger 1 (tim_itr9)

0xE : B_0xE

Internal Trigger 1 (tim_itr10)

End of enumeration elements list.

MSM : Master/slave mode
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No action

0x1 : B_0x1

The effect of an event on the trigger input (tim_trgi) is delayed to allow a perfect synchronization between the current timer and its slaves (through tim_trgo). It is useful if we want to synchronize several timers on a single external event.

End of enumeration elements list.

ETF : External trigger filter This bit-field then defines the frequency used to sample tim_etrp signal and the length of the digital filter applied to tim_etrp. The digital filter is made of an event counter in which N consecutive events are needed to validate a transition on the output:
bits : 8 - 11 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

No filter, sampling is done at fDTS

0x1 : B_0x1

fSAMPLING=ftim_ker_ck, N=2

0x2 : B_0x2

fSAMPLING=ftim_ker_ck, N=4

0x3 : B_0x3

fSAMPLING=ftim_ker_ck, N=8

0x4 : B_0x4

fSAMPLING=fDTS/2, N=6

0x5 : B_0x5

fSAMPLING=fDTS/2, N=8

0x6 : B_0x6

fSAMPLING=fDTS/4, N=6

0x7 : B_0x7

fSAMPLING=fDTS/4, N=8

0x8 : B_0x8

fSAMPLING=fDTS/8, N=6

0x9 : B_0x9

fSAMPLING=fDTS/8, N=8

0xA : B_0xA

fSAMPLING=fDTS/16, N=5

0xB : B_0xB

fSAMPLING=fDTS/16, N=6

0xC : B_0xC

fSAMPLING=fDTS/16, N=8

0xD : B_0xD

fSAMPLING=fDTS/32, N=5

0xE : B_0xE

fSAMPLING=fDTS/32, N=6

0xF : B_0xF

fSAMPLING=fDTS/32, N=8

End of enumeration elements list.

ETPS : External trigger prescaler External trigger signal tim_etrp frequency must be at most 1/4 of TIMxCLK frequency. A prescaler can be enabled to reduce tim_etrp frequency. It is useful when inputting fast external clocks on tim_etr_in.
bits : 12 - 13 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Prescaler OFF

0x1 : B_0x1

tim_etr_in frequency divided by 2

0x2 : B_0x2

tim_etr_in frequency divided by 4

0x3 : B_0x3

tim_etr_in frequency divided by 8

End of enumeration elements list.

ECE : External clock enable This bit enables External clock mode 2. Note: Setting the ECE bit has the same effect as selecting external clock mode 1 with tim_trgi connected to tim_etrf (SMS=111 and TS=00111). It is possible to simultaneously use external clock mode 2 with the following slave modes: reset mode, gated mode and trigger mode. Nevertheless, tim_trgi must not be connected to tim_etrf in this case (TS bits must not be 00111). If external clock mode 1 and external clock mode 2 are enabled at the same time, the external clock input is tim_etrf.
bits : 14 - 14 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

External clock mode 2 disabled

0x1 : B_0x1

External clock mode 2 enabled. The counter is clocked by any active edge on the tim_etrf signal.

End of enumeration elements list.

ETP : External trigger polarity This bit selects whether tim_etr_in or tim_etr_in is used for trigger operations
bits : 15 - 15 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tim_etr_in is non-inverted, active at high level or rising edge.

0x1 : B_0x1

tim_etr_in is inverted, active at low level or falling edge.

End of enumeration elements list.

SMS2 : Slave mode selection When external signals are selected the active edge of the trigger signal (tim_trgi) is linked to the polarity selected on the external input (see Input Control register and Control Register description. Note: The gated mode must not be used if tim_ti1f_ed is selected as the trigger input (TS=00100). Indeed, tim_ti1f_ed outputs 1 pulse for each transition on TI1F, whereas the gated mode checks the level of the trigger signal. Note: The clock of the slave peripherals (timer, ADC, ...) receiving the tim_trgo or the tim_trgo2 signals must be enabled prior to receive events from the master timer, and the clock frequency (prescaler) must not be changed on-the-fly while triggers are received from the master timer.
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Slave mode disabled - if CEN = '1’ then the prescaler is clocked directly by the internal clock.

0x1 : B_0x1

Quadrature encoder mode 1, x2 mode- Counter counts up/down on tim_ti1fp1 edge depending on tim_ti2fp2 level.

0x2 : B_0x2

Quadrature encoder mode 2, x2 mode - Counter counts up/down on tim_ti2fp2 edge depending on tim_ti1fp1 level.

0x3 : B_0x3

Quadrature encoder mode 3, x4 mode - Counter counts up/down on both tim_ti1fp1 and tim_ti2fp2 edges depending on the level of the other input.

0x4 : B_0x4

Reset Mode - Rising edge of the selected trigger input (tim_trgi) reinitializes the counter and generates an update of the registers.

0x5 : B_0x5

Gated Mode - The counter clock is enabled when the trigger input (tim_trgi) is high. The counter stops (but is not reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled.

0x6 : B_0x6

Trigger Mode - The counter starts at a rising edge of the trigger tim_trgi (but it is not reset). Only the start of the counter is controlled.

0x7 : B_0x7

External Clock Mode 1 - Rising edges of the selected trigger (tim_trgi) clock the counter.

0x8 : B_0x8

Combined reset + trigger mode - Rising edge of the selected trigger input (tim_trgi) reinitializes the counter, generates an update of the registers and starts the counter.

0x9 : B_0x9

Combined gated + reset mode - The counter clock is enabled when the trigger input (tim_trgi) is high. The counter stops and is reset) as soon as the trigger becomes low. Both start and stop of the counter are controlled.

0xA : B_0xA

Encoder mode: Clock plus direction, x2 mode.

0xB : B_0xB

Encoder mode: Clock plus direction, x1 mode, tim_ti2fp2 edge sensitivity is set by CC2P

0xC : B_0xC

Encoder mode: Directional Clock, x2 mode.

0xD : B_0xD

Encoder mode: Directional Clock, x1 mode, tim_ti1fp1 and tim_ti2fp2 edge sensitivity is set by CC1P and CC2P.

0xE : B_0xE

Quadrature encoder mode: x1 mode, counting on tim_ti1fp1 edges only, edge sensitivity is set by CC1P.

0xF : B_0xF

Quadrature encoder mode: x1 mode, counting on tim_ti2fp2 edges only, edge sensitivity is set by CC2P.

End of enumeration elements list.

TS2 : Trigger selection - bit 4:3 Refer to TS[2:0] description - bits 6:4 null Trigger selection This bitfield is combined with TS[4:3] bits. This bit-field selects the trigger input to be used to synchronize the counter. others: Reserved See for more details on tim_itrx meaning for each Timer. Note: These bits must be changed only when they are not used (e.g. when SMS=000) to avoid wrong edge detections at the transition.
bits : 20 - 21 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Internal Trigger 0 (tim_itr0)

0x1 : B_0x1

Internal Trigger 1 (tim_itr1)

0x2 : B_0x2

Internal Trigger 2 (tim_itr2)

0x3 : B_0x3

Internal Trigger 3 (tim_itr3)

0x4 : B_0x4

tim_ti1 Edge Detector (tim_ti1f_ed)

0x5 : B_0x5

Filtered Timer Input 1 (tim_ti1fp1)

0x6 : B_0x6

Filtered Timer Input 2 (tim_ti2fp2)

0x7 : B_0x7

External Trigger input (tim_etrf)

0x8 : B_0x8

Internal Trigger 0 (tim_itr4)

0x9 : B_0x9

Internal Trigger 1 (tim_itr5)

0xA : B_0xA

Internal Trigger 1 (tim_itr6)

0xB : B_0xB

Internal Trigger 1 (tim_itr7)

0xC : B_0xC

Internal Trigger 1 (tim_itr8)

0xD : B_0xD

Internal Trigger 1 (tim_itr9)

0xE : B_0xE

Internal Trigger 1 (tim_itr10)

End of enumeration elements list.

SMSPE : SMS preload enable This bit selects whether the SMS[3:0] bitfield is preloaded
bits : 24 - 24 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

SMS[3:0] bitfield is not preloaded 

0x1 : B_0x1

SMS[3:0] preload is enabled

End of enumeration elements list.

SMSPS : SMS preload source This bit selects whether the events that triggers the SMS[3:0] bitfield transfer from preload to active
bits : 25 - 25 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

The transfer is triggered by the Timer’s Update event

0x1 : B_0x1

The transfer is triggered by the Index event

End of enumeration elements list.


TIM1_DIER (DIER)

TIM1 DMA/interrupt enable register
address_offset : 0xC Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TIM1_DIER TIM1_DIER read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 UIE CC1IE CC2IE CC3IE CC4IE COMIE TIE BIE UDE CC1DE CC2DE CC3DE CC4DE COMDE TDE IDXIE DIRIE IERRIE TERRIE

UIE : Update interrupt enable
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Update interrupt disabled

0x1 : B_0x1

Update interrupt enabled

End of enumeration elements list.

CC1IE : Capture/compare 1 interrupt enable
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC1 interrupt disabled

0x1 : B_0x1

CC1 interrupt enabled

End of enumeration elements list.

CC2IE : Capture/compare 2 interrupt enable
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC2 interrupt disabled

0x1 : B_0x1

CC2 interrupt enabled

End of enumeration elements list.

CC3IE : Capture/compare 3 interrupt enable
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC3 interrupt disabled

0x1 : B_0x1

CC3 interrupt enabled

End of enumeration elements list.

CC4IE : Capture/compare 4 interrupt enable
bits : 4 - 4 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC4 interrupt disabled

0x1 : B_0x1

CC4 interrupt enabled

End of enumeration elements list.

COMIE : COM interrupt enable
bits : 5 - 5 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

COM interrupt disabled

0x1 : B_0x1

COM interrupt enabled

End of enumeration elements list.

TIE : Trigger interrupt enable
bits : 6 - 6 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Trigger interrupt disabled

0x1 : B_0x1

Trigger interrupt enabled

End of enumeration elements list.

BIE : Break interrupt enable
bits : 7 - 7 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Break interrupt disabled

0x1 : B_0x1

Break interrupt enabled

End of enumeration elements list.

UDE : Update DMA request enable
bits : 8 - 8 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Update DMA request disabled

0x1 : B_0x1

Update DMA request enabled

End of enumeration elements list.

CC1DE : Capture/compare 1 DMA request enable
bits : 9 - 9 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC1 DMA request disabled

0x1 : B_0x1

CC1 DMA request enabled

End of enumeration elements list.

CC2DE : Capture/compare 2 DMA request enable
bits : 10 - 10 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC2 DMA request disabled

0x1 : B_0x1

CC2 DMA request enabled

End of enumeration elements list.

CC3DE : Capture/compare 3 DMA request enable
bits : 11 - 11 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC3 DMA request disabled

0x1 : B_0x1

CC3 DMA request enabled

End of enumeration elements list.

CC4DE : Capture/compare 4 DMA request enable
bits : 12 - 12 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC4 DMA request disabled

0x1 : B_0x1

CC4 DMA request enabled

End of enumeration elements list.

COMDE : COM DMA request enable
bits : 13 - 13 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

COM DMA request disabled

0x1 : B_0x1

COM DMA request enabled

End of enumeration elements list.

TDE : Trigger DMA request enable
bits : 14 - 14 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Trigger DMA request disabled

0x1 : B_0x1

Trigger DMA request enabled

End of enumeration elements list.

IDXIE : Index interrupt enable
bits : 20 - 20 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index interrupt disabled

0x1 : B_0x1

Index Change interrupt enabled

End of enumeration elements list.

DIRIE : Direction change interrupt enable
bits : 21 - 21 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Direction Change interrupt disabled

0x1 : B_0x1

Direction Change interrupt enabled

End of enumeration elements list.

IERRIE : Index error interrupt enable
bits : 22 - 22 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Index error interrupt disabled

0x1 : B_0x1

Index error interrupt enabled

End of enumeration elements list.

TERRIE : Transition error interrupt enable
bits : 23 - 23 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Transition error interrupt disabled

0x1 : B_0x1

Transition error interrupt enabled

End of enumeration elements list.



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.