01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>STM32W108C8</strong><br />

General-purpose timers<br />

10.3 General-purpose timer (1 and 2) registers<br />

10.3.1 Timer x control register 1 (TIMx_CR1)<br />

Address offset: 0xE000 (TIM1) and 0xF000 (TIM2)<br />

Reset value: 0x0000 0000<br />

Table 87.<br />

Timer x control register 1 (TIMx_CR1)<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16<br />

Reserved<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

Reserved<br />

TIM_A<br />

RBE<br />

TIM_CMS<br />

TIM_D<br />

IR<br />

TIM_O<br />

PM<br />

TIM_U<br />

RS<br />

TIM_U<br />

DIS<br />

TIM_C<br />

EN<br />

rw rw rw rw rw rw rw<br />

Bit 7 TIM_ARBE: Auto-Reload Buffer Enable<br />

0: TIMx_ARR register is not buffered.<br />

1: TIMx_ARR register is buffered.<br />

Bits [6:5] TIM_CMS: Center-aligned Mode Selection<br />

00: Edge-aligned mode. The counter counts up or down depending on the direction bit<br />

(TIM_DIR).<br />

01: Center-aligned mode 1. The counter counts up and down alternatively.<br />

Output compare interrupt flags of configured output channels (TIM_CCyS=00 in TIMx_CCMRy<br />

register) are set only when the counter is counting down.<br />

10: Center-aligned mode 2. The counter counts up and down alternatively.<br />

Output compare interrupt flags of configured output channels (TIM_CCyS=00 in TIMx_CCMRy<br />

register) are set only when the counter is counting up.<br />

11: Center-aligned mode 3. The counter counts up and down alternatively.<br />

Output compare interrupt flags of configured output channels (TIM_CCyS=00 in TIMx_CCMRy<br />

register) are set both when the counter is counting up or down.<br />

Note: Software may not switch from edge-aligned mode to center-aligned mode when the<br />

counter is enabled (TIM_CEN=1).<br />

Bit 4 TIM_DIR: Direction<br />

0: Counter used as up-counter.<br />

1: Counter used as down-counter.<br />

Bit 3 TIM_OPM: One Pulse Mode<br />

0: Counter does not stop counting at the next update event.<br />

1: Counter stops counting at the next update event (and clears the bit TIM_CEN).<br />

Bit 2 TIM_URS: Update Request Source<br />

0: When enabled, update interrupt requests are sent as soon as registers are updated (counter<br />

overflow/underflow, setting the TIM_UG bit, or update generation through the slave mode<br />

controller).<br />

1: When enabled, update interrupt requests are sent only when the counter reaches overflow or<br />

underflow.<br />

Doc ID 018587 Rev 2 142/215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!