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.

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

Figure 89. Counter timing diagram, update event with ARPE=1 (counter underflow)<br />

Figure 90. Counter timing diagram, Update event with ARPE=1 (counter overflow)<br />

14.3.3 Repetition counter<br />

CK_PSC<br />

CEN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter underflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

Section 14.3.1: Time-base unit describes how the update event (UEV) is generated with<br />

respect to the counter overflows/underflows. It is actually generated only when the repetition<br />

counter has reached zero. This can be useful when generating PWM signals.<br />

This means that data are transferred from the preload registers to the shadow registers<br />

(TIMx_ARR auto-reload register, TIMx_PSC prescaler register, but also TIMx_CCRx<br />

capture/compare registers in compare mode) every N+1 counter overflows or underflows,<br />

where N is the value in the TIMx_RCR repetition counter register.<br />

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

06<br />

05 04 03 02 01 00 01 02 03 04 05 06 07<br />

Auto-reload preload register FD 36<br />

Write a new value in TIMx_ARR<br />

Auto-reload active register FD 36<br />

CK_PSC<br />

CEN<br />

Timer clock = CK_CNT<br />

Counter register<br />

Counter overflow<br />

Update event (UEV)<br />

Update interrupt flag (UIF)<br />

F7<br />

F8 F9 FA FB FC 36 35 34 33 32 31 30 2F<br />

Auto-reload preload register FD 36<br />

Write a new value in TIMx_ARR<br />

Auto-reload active register FD 36

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

Saved successfully!

Ooh no, something went wrong!