23 General-purpose timers (TIM2/TIM3/TIM4/TIM5)
23.1 TIM2/TIM3/TIM4/TIM5 introduction
The general-purpose timers ประกอบด้วย a 16-bit or 32-bit auto-reload counter ที่ขับโดย a programmable prescaler.
มันอาจถูกใช้เพื่อวัตถุประสงค์ที่หลากหลาย, รวมถึงการวัด the pulse lengths of input signals (input capture) หรือการสร้าง output waveforms (output compare, PWM).
Pulse lengths and waveform periods สามารถถูกมอดูเลตได้ตั้งแต่ไม่กี่ไมโครวินาทีไปจนถึงหลายมิลลิวินาทีโดยใช้ the timer prescaler and the RCC clock controller prescalers.
The timers เป็นอิสระอย่างสมบูรณ์และไม่แบ่งปันทรัพยากรใด ๆ พวกมันสามารถถูกซิงโครไนซ์เข้าด้วยกันตามที่อธิบายไว้ใน Section 23.3.19: Timer synchronization.