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.

General-purpose timers (TIM9 to TIM14) <strong>RM0090</strong><br />

setting the UIF flag (thus no interrupt is sent). This is to avoid generating both update and<br />

capture interrupts when clearing the counter on the capture event.<br />

When an update event occurs, all the registers are updated and the update flag (UIF bit in<br />

TIMx_SR register) is set (depending on the URS bit):<br />

● The auto-reload shadow register is updated with the preload value (TIMx_ARR),<br />

● The buffer of the prescaler is reloaded with the preload value (content of the TIMx_PSC<br />

register).<br />

The following figures show some examples of the counter behavior for different clock<br />

frequencies when TIMx_ARR=0x36.<br />

Figure 169. Counter timing diagram, internal clock divided by 1<br />

CK_PSC<br />

CNT_EN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

Figure 170. Counter timing diagram, internal clock divided by 2<br />

CK_PSC<br />

CNT_EN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

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

31<br />

32 33 34 35 36 00 01 02 03 04 05 06 07<br />

0034 0035 0036 0000 0001 0002 0003

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

Saved successfully!

Ooh no, something went wrong!