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> Basic timers (TIM6&TIM7)<br />

register is set, setting the UG bit generates an update event UEV, but the UIF flag is not set<br />

(so no interrupt or DMA request is sent).<br />

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

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

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

TIMx_PSC register)<br />

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

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

frequencies when TIMx_ARR = 0x36.<br />

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

CK_INT<br />

CNT_EN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

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

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

CK_INT<br />

CNT_EN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

31<br />

0034 0035 0036 0000 0001 0002 0003<br />

Doc ID 018909 Rev 3 524/1416

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

Saved successfully!

Ooh no, something went wrong!