09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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>RM0090</strong> General-purpose timers (TIM2 to TIM5)<br />

Figure 162. Triggering timer 2 with update of timer 1<br />

CK_INT<br />

TIMER1-UEV<br />

TIMER1-CNT<br />

TIMER2-CNT<br />

TIMER2-CEN=CNT_EN<br />

TIMER 2-TIF<br />

FD FE FF 00 01<br />

Write TIF=0<br />

As in the previous example, you can initialize both counters before starting counting.<br />

Figure 163 shows the behavior with the same configuration as in Figure 162 but in trigger<br />

mode instead of gated mode (SMS=110 in the TIM2_SMCR register).<br />

Figure 163. Triggering timer 2 with Enable of timer 1<br />

CK_INT<br />

TIMER1-CEN=CNT_EN<br />

TIMER1-CNT_INIT<br />

TIMER1-CNT<br />

TIMER2-CNT<br />

TIMER2-CNT_INIT<br />

TIMER2<br />

write CNT<br />

TIMER 2-TIF<br />

45 46 47 48<br />

75 00 01<br />

CD 00 E7 E8 E9<br />

EA<br />

Write TIF=0<br />

Doc ID 018909 Rev 3 452/1416<br />

02<br />

02

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

Saved successfully!

Ooh no, something went wrong!