Skip to main content

Subsection 8.3.1 Register Summary

Table 8.3.1. The TIM14 registers used in this chapter
Register Offset Bit(s) used Purpose RM0490
TIM14_CR1 0x00 CEN (bit 0) Counter enable: set to start counting §17.4.1
TIM14_DIER 0x0C UIE (bit 0) Update interrupt enable: update events raise an interrupt request §17.4.2
TIM14_SR 0x10 UIF (bit 0) Update interrupt flag: set by hardware at each update event; rc_w0, cleared by software §17.4.3
TIM14_CNT 0x24 CNT[15:0] The running count: zero it before starting §17.4.8
TIM14_PSC 0x28 PSC[15:0] Prescaler: counter clock is input clock ÷ (PSC + 1) §17.4.9
TIM14_ARR 0x2C ARR[15:0] Auto-reload: counter wraps to 0 after reaching this value §17.4.10
The period formula, in one place: with input clock \(f\) (12 MHz in this course),
\begin{equation*} t_{period} = \frac{(\text{PSC}+1)\times(\text{ARR}+1)}{f} \end{equation*}
where PSC and ARR are the values as written to the registers. Both are 16 bits; neither written value can exceed 65,535.