![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 206](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630206.webp)
www.geehy.com Page 205
Figure 41 Timing Diagram when Division Factor is 1 or 2 in Center-aligned Mode
CNT_EN
CK_CNT
04
03
02
01
00
01
02
03
04
03
02
01
Counter register
Counter underrun
Counter overrun
CK_PSC
PSC=1
CK_CNT
00
01
0003
0002
0001
0000
0001
0002
0003
Counter overrun
Update event
PSC=2
Counter register
Update event
Prescaler PSC
The prescaler is 16 bits and programmable, and it can divide the clock
frequency of the counter to any value between 1 and 65536 (controlled by
TMRx_PSC register), and after frequency division, the clock will drive the
counter CNT to count. The prescaler has a buffer, which can be changed during
running.
Input capture
Input capture channel
The general-purpose timer has four independent capture/compare channels,
each of which is surrounded by a capture/compare register.
In the input capture, the measured signal will enter from the external pin
T1/2/3/4 of the timer, first pass through the edge detector and input filter, and
then into the capture channel. Each capture channel has a corresponding
capture register. When the capture occurs, the value of the counter CNT will be
latched in the capture register CCx. Before entering the capture register, the