09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>RM0090</strong> Advanced-control timers (TIM1&TIM8)<br />

14.3.5 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 and prescaler) and<br />

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

Figure 97 to Figure 100 give 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 command. It is<br />

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

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

TI1<br />

f DTS<br />

filter<br />

downcounter<br />

ICF[3:0]<br />

TIMx_CCMR1<br />

Edge<br />

Detector<br />

TI1F_Rising<br />

TI1F_Falling<br />

CC1P/CC1NP<br />

TIMx_CCER<br />

(from channel 2)<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 />

Figure 98. Capture/compare channel 1 main circuit<br />

read CCR1H S<br />

read CCR1L<br />

R<br />

CC1S[1]<br />

CC1S[0]<br />

IC1PS<br />

CC1E<br />

CC1G<br />

TIM1_EGR<br />

read_in_progress<br />

input<br />

mode<br />

TI1F<br />

TI2F_rising<br />

(from channel 2)<br />

TI2F_falling<br />

Capture/compare preload register<br />

capture_transfer<br />

Capture/compare shadow register<br />

capture<br />

APB Bus<br />

MCU-peripheral interface<br />

high<br />

(if 16-bit)<br />

8 8<br />

Counter<br />

low<br />

0<br />

1<br />

0<br />

1<br />

TI1FP1<br />

TI1F_ED<br />

TI2FP1<br />

compare_transfer<br />

to the slave mode controller<br />

ICPS[1:0]<br />

divider<br />

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

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

01<br />

10<br />

TRC<br />

(from slave mode<br />

controller)<br />

11<br />

comparator<br />

CC1S[1:0]<br />

write_in_progress<br />

output<br />

mode<br />

IC1<br />

TIMx_CCMR1<br />

CNT>CCR1<br />

CNT=CCR1<br />

S<br />

R<br />

CC1E<br />

IC1PS<br />

TIMx_CCER<br />

write CCR1H<br />

write CCR1L<br />

CC1S[1]<br />

CC1S[0]<br />

OC1PE<br />

OC1PE<br />

UEV<br />

(from time<br />

base unit)<br />

TIM1_CCMR1

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

Saved successfully!

Ooh no, something went wrong!