\n

TIM

Peripheral Memory Blocks

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

Registers

CR1

SR

EGR

CCMR1_Output

CCMR1_Input

CCER

CNT

PSC

ARR

CCR1

TISEL

DIER


CR1

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

CR1 CR1 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 CEN UDIS URS OPM ARPE CKD UIFREMAP

CEN : Counter enable Note: External clock and gated 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 update interrupt (UEV) event generation. Counter overflow Setting the UG bit. Buffered registers are then loaded with their preload values.
bits : 1 - 1 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

UEV enabled. An UEV is generated by one of the following events:

0x1 : B_0x1

UEV disabled. No UEV is generated, shadow registers keep their value (ARR, PSC, CCRx). The counter and the prescaler are reinitialized if the UG bit is set.

End of enumeration elements list.

URS : Update request source This bit is set and cleared by software to select the update interrupt (UEV) sources. Counter overflow Setting the UG bit
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Any of the following events generate an UEV if enabled:

0x1 : B_0x1

Only counter overflow generates an UEV 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 on the update event

0x1 : B_0x1

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

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 (CK_INT) frequency and sampling clock used by the digital filters (TIx),
bits : 8 - 9 (2 bit)
access : read-write

Enumeration:

0x0 : B_0x0

tDTS = tCK_INT

0x1 : B_0x1

tDTS = 2 × tCK_INT

0x2 : B_0x2

tDTS = 4 × tCK_INT

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.


SR

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

SR 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 CC1OF

UIF : Update interrupt flag This bit is set by hardware on an update event. It is cleared by software. At overflow and if 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.
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 he 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 down-counting 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.

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.


EGR

event generation register
address_offset : 0x14 Bytes (0x0)
size : 32 bit
access : write-only
reset_value : 0x0
reset_Mask : 0x0

EGR EGR write-only 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 UG CC1G

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

Re-initialize 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.

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 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 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.


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

CCMR1_Output 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 OC1M1 OC1M2

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, IC1 is mapped on TI1.

End of enumeration elements list.

OC1FE : Output compare 1 fast enable This bit decreases the latency between a trigger event and a transition on the timer output. It must be used in one-pulse mode (OPM bit set in TIMx_CR1 register), to have the output pulse starting as soon as possible after the starting trigger.
bits : 2 - 2 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

CC1 behaves normally depending on counter and CCR1 values even when the trigger is ON. The minimum delay to activate CC1 output when an edge occurs on the trigger input is 5 clock cycles.

0x1 : B_0x1

An active edge on the trigger input acts like a compare match on CC1 output. OC is then set to the compare level independently of the result of the comparison. Delay to sample the trigger input and to activate CC1 output is reduced to 3 clock cycles. OC1FE acts only if the channel is configured in PWM1 or PWM2 mode.

End of enumeration elements list.

OC1PE : Output compare 1 preload enable Note: The PWM mode can be used without validating the preload register only in one pulse mode (OPM bit set in TIMx_CR1 register). Else the behavior is not guaranteed.
bits : 3 - 3 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Preload register on TIMx_CCR1 disabled. TIMx_CCR1 can be written at anytime, the new value is taken in account immediately.

0x1 : B_0x1

Preload register on TIMx_CCR1 enabled. Read/Write operations access the preload register. TIMx_CCR1 preload value is loaded in the active register at each update event.

End of enumeration elements list.

OC1M1 : Output compare 1 mode (refer to bit 16 for OC1M[3]) These bits define the behavior of the output reference signal OC1REF from which OC1 is derived. OC1REF is active high whereas OC1 active level depends on CC1P bit. Others: Reserved Note: In PWM mode 1 or 2, the OCREF level changes when the result of the comparison changes or when the output compare mode switches from frozen to PWM mode. Note: The OC1M[3] bit is not contiguous, located in bit 16.
bits : 4 - 6 (3 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Frozen. The comparison between the output compare register TIMx_CCR1 and the counter TIMx_CNT has no effect on the outputs.

0x1 : B_0x1

Set channel 1 to active level on match. OC1REF signal is forced high when the counter TIMx_CNT matches the capture/compare register 1 (TIMx_CCR1).

0x2 : B_0x2

Set channel 1 to inactive level on match. OC1REF signal is forced low when the counter TIMx_CNT matches the capture/compare register 1 (TIMx_CCR1).

0x3 : B_0x3

Toggle - OC1REF toggles when TIMx_CNT = TIMx_CCR1.

0x4 : B_0x4

Force inactive level - OC1REF is forced low.

0x5 : B_0x5

Force active level - OC1REF is forced high.

0x6 : B_0x6

PWM mode 1 - Channel 1 is active as long as TIMx_CNT < TIMx_CCR1 else inactive.

0x7 : B_0x7

PWM mode 2 - Channel 1 is inactive as long as TIMx_CNT < TIMx_CCR1 else active

End of enumeration elements list.

OC1M2 : Output compare 1 mode (refer to bit 16 for OC1M[3]) These bits define the behavior of the output reference signal OC1REF from which OC1 is derived. OC1REF is active high whereas OC1 active level depends on CC1P bit. Others: Reserved Note: In PWM mode 1 or 2, the OCREF level changes when the result of the comparison changes or when the output compare mode switches from frozen to PWM mode. Note: The OC1M[3] bit is not contiguous, located in bit 16.
bits : 16 - 16 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Frozen. The comparison between the output compare register TIMx_CCR1 and the counter TIMx_CNT has no effect on the outputs.

0x1 : B_0x1

Set channel 1 to active level on match. OC1REF signal is forced high when the counter TIMx_CNT matches the capture/compare register 1 (TIMx_CCR1).

0x2 : B_0x2

Set channel 1 to inactive level on match. OC1REF signal is forced low when the counter TIMx_CNT matches the capture/compare register 1 (TIMx_CCR1).

0x3 : B_0x3

Toggle - OC1REF toggles when TIMx_CNT = TIMx_CCR1.

0x4 : B_0x4

Force inactive level - OC1REF is forced low.

0x5 : B_0x5

Force active level - OC1REF is forced high.

0x6 : B_0x6

PWM mode 1 - Channel 1 is active as long as TIMx_CNT < TIMx_CCR1 else inactive.

0x7 : B_0x7

PWM mode 2 - Channel 1 is inactive as long as TIMx_CNT < TIMx_CCR1 else active

End of enumeration elements list.


CCMR1_Input

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

CCMR1_Input 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

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, IC1 is mapped on TI1

End of enumeration elements list.

IC1PSC : Input capture 1 prescaler This bit-field defines the ratio of the prescaler acting on CC1 input (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 TI1 input and the length of the digital filter applied to 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=fCK_INT, N=2

0x2 : B_0x2

fSAMPLING=fCK_INT, N=4

0x3 : B_0x3

fSAMPLING=fCK_INT, 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.


CCER

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

CCER 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 CC1NP

CC1E : Capture/Compare 1 output enable.
bits : 0 - 0 (1 bit)
access : read-write

Enumeration:

0x0 : B_0x0

Capture mode disabled / OC1 is not active

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: This configuration is reserved, it must not be used.
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.

CC1NP : Capture/Compare 1 complementary output Polarity. CC1 channel configured as output: CC1NP must be kept cleared. CC1 channel configured as input: CC1NP bit is used in conjunction with CC1P to define TI1FP1 polarity (refer to CC1P description).
bits : 3 - 3 (1 bit)
access : read-write


CNT

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

CNT 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 : low counter value
bits : 0 - 15 (16 bit)

UIFCPY : UIF Copy
bits : 31 - 31 (1 bit)


PSC

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

PSC PSC 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 PSC

PSC : Prescaler value
bits : 0 - 15 (16 bit)


ARR

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

ARR 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 : Low Auto-reload value
bits : 0 - 15 (16 bit)


CCR1

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

CCR1 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 : Low Capture/Compare 1 value
bits : 0 - 15 (16 bit)


TISEL

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

TISEL 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

TI1SEL : selects TI1[0] to TI1[15] input Others: Reserved
bits : 0 - 3 (4 bit)
access : read-write

Enumeration:

0x0 : B_0x0

TIM14_CH1 input

0x1 : B_0x1

RTC CLK

0x2 : B_0x2

HSE/32

0x3 : B_0x3

MCO

End of enumeration elements list.


DIER

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

DIER 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

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.



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.