General Timers
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
199
10.3.3
Block Diagram
The block diagram of the PWM timer (TIM5) is shown in Fig 10-5.
CNT counter
PSC
presclaer
Auto-reload register
CK_PSC
Capture/Compare
Register 0
TRGI
Capture/Compare
Register 1
Capture/Compare
Register 2
Capture/Compare
Register 3
OC0
OC1
OC2
OC3
CK_CNT
Capture/Compare
Register 4
Capture/Compare
Register 5
OC4
OC5
Capture/Compare
Register 17
...
OC17
...
...
Fig 10-5 PWM timer block diagram
10.3.4
Functional Description
10.3.4.1
Upcounting Mode
This timer is a 16-bit counter with its related auto-reload register. The counter can count up. The counter clock can be divided by a 8-bit prescaler.
The counter, also the auto-reload register and the prescaler register can be written or read by software. This is true even when the counter is
running.
The time-base unit includes:
Counter register (TIMx_CNT)
Prescaler register (TIMx_PSC)
Auto-reload register (TIMx_ARR)
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03