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 (TIM9 to TIM14)<br />

16.5.3 TIM9/12 slave mode control register (TIMx_SMCR)<br />

Address offset: 0x08<br />

Reset value: 0x0000<br />

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

Reserved<br />

Bits 15:8 Reserved, must be kept at reset value.<br />

MSM TS[2:0]<br />

SMS[2:0]<br />

Res.<br />

rw rw rw rw rw rw rw<br />

Bit 7 MSM: Master/Slave mode<br />

0: No action<br />

1: The effect of an event on the trigger input (TRGI) is delayed to allow a perfect<br />

synchronization between the current timer and its slaves (through TRGO). It is useful in<br />

order to synchronize several timers on a single external event.<br />

Bits 6:4 TS: Trigger selection<br />

This bitfield selects the trigger input to be used to synchronize the counter.<br />

000: Internal Trigger 0 (ITR0)<br />

001: Internal Trigger 1 (ITR1)<br />

010: Internal Trigger 2 (ITR2)<br />

011: Internal Trigger 3 (ITR3)<br />

100: TI1 Edge Detector (TI1F_ED)<br />

101: Filtered Timer Input 1 (TI1FP1)<br />

110: Filtered Timer Input 2 (TI2FP2)<br />

111: Reserved.<br />

See Table 77: TIMx internal trigger connection on page 501 for more details on the meaning<br />

of ITRx for each timer.<br />

Note: These bits must be changed only when they are not used (e.g. when SMS=’000’) to<br />

avoid wrong edge detections at the transition.<br />

Bit 3 Reserved, must be kept at reset value.<br />

Bits 2:0 SMS: Slave mode selection<br />

When external signals are selected, the active edge of the trigger signal (TRGI) is linked to<br />

the polarity selected on the external input (see Input control register and Control register<br />

descriptions.<br />

000: Slave mode disabled - if CEN = 1 then the prescaler is clocked directly by the internal<br />

clock<br />

001: Reserved<br />

010: Reserved<br />

011: Reserved<br />

100: Reset mode - Rising edge of the selected trigger input (TRGI) reinitializes the counter<br />

and generates an update of the registers<br />

101: Gated mode - The counter clock is enabled when the trigger input (TRGI) is high. The<br />

counter stops (but is not reset) as soon as the trigger becomes low. Counter starts and<br />

stops are both controlled<br />

110: Trigger mode - The counter starts on a rising edge of the trigger TRGI (but it is not<br />

reset). Only the start of the counter is controlled<br />

111: External clock mode 1 - Rising edges of the selected trigger (TRGI) clock the counter<br />

Note: The Gated mode must not be used if TI1F_ED is selected as the trigger input<br />

(TS=’100’). Indeed, TI1F_ED outputs 1 pulse for each transition on TI1F, whereas the<br />

Gated mode checks the level of the trigger signal.<br />

Doc ID 018909 Rev 3 500/1416

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

Saved successfully!

Ooh no, something went wrong!