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.

General-purpose timers<br />

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

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

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

Figure 45 shows the behavior with the same configuration shown in Figure 46, but in trigger<br />

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

Figure 47. Triggering Timer 2 with enable of Timer 1<br />

Starting both timers synchronously in response to an external trigger<br />

This example, sets the enable of Timer 1 when its TI1 input rises, and the enable of Timer 2<br />

with the enable of Timer 1. Refer to Figure 43 for connections. To ensure the counters are<br />

aligned, Timer 1 must be configured in master/slave mode (slave with respect to TI1, master<br />

with respect to Timer 2):<br />

● Configure Timer 1 in master mode to send its Enable as trigger output (TIM_MMS =<br />

001 in the TIM1_CR2 register).<br />

● Configure Timer 1 slave mode to get the input trigger from TI1 (TIM_TS = 100 in the<br />

TIM1_SMCR register).<br />

● Configure Timer 1 in trigger mode (TIM_SMS = 110 in the TIM1_SMCR register).<br />

139/215 Doc ID 018587 Rev 2

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

Saved successfully!

Ooh no, something went wrong!