29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

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 timer (TIMx)<br />

RM0008<br />

Figure 123. Control circuit in external clock mode 2<br />

f MASTER<br />

CNT_EN<br />

ETR<br />

ETRP<br />

ETRF<br />

Counter clock = CK_CNT = CK_PSC<br />

Counter register 34<br />

35 36<br />

14.3.4 Capture/compare channels<br />

Each Capture/Compare channel is built around a capture/compare register (including a<br />

shadow register), a input stage for capture (with digital filter, multiplexing <strong>and</strong> prescaler) <strong>and</strong><br />

an output stage (with comparator <strong>and</strong> output control).<br />

The following figure gives an overview of one Capture/Compare channel.<br />

The input stage samples the corresponding TIx input to generate a filtered signal TIxF.<br />

Then, an edge detector with polarity selection generates a signal (TIxFPx) which can be<br />

used as trigger input by the slave mode controller or as the capture comm<strong>and</strong>. It is<br />

prescaled before the capture register (ICxPS).<br />

Figure 124. Capture/compare channel (example: channel 1 input stage)<br />

TI1F_ED<br />

to the slave mode controller<br />

TI1F_Rising<br />

TI1 0<br />

filter<br />

TI1F<br />

Edge<br />

f DTS downcounter<br />

Detector TI1F_Falling<br />

1<br />

ICF[3:0]<br />

TIMx_CCMR1<br />

CC1P<br />

TIMx_CCER<br />

TI2F_rising<br />

(from channel 2)<br />

TI2F_falling<br />

(from channel 2)<br />

0<br />

1<br />

TI1FP1<br />

TI2FP1<br />

01<br />

10<br />

TRC<br />

11<br />

(from slave mode<br />

controller)<br />

CC1S[1:0]<br />

IC1<br />

ICPS[1:0]<br />

TIMx_CCMR1<br />

divider<br />

/1, /2, /4, /8<br />

CC1E<br />

IC1PS<br />

TIMx_CCER<br />

The output stage generates an intermediate waveform which is then used for reference:<br />

OCxRef (active high). The polarity acts at the end of the chain.<br />

334/995 Doc ID 13902 Rev 9

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

Saved successfully!

Ooh no, something went wrong!