English
Language : 

W90P710_05 Datasheet, PDF (479/526 Pages) Winbond – 16/32-bit ARM microcontroller
W90P710
7.20 PWM
The W90P710 have 4 channels PWM timers. They can be divided into two groups. Each group has 1
Prescaler, 1 clock divider, 2 clock selectors, 2 16-bit counters, 2 16-bit comparators, 1 Dead-Zone
generator. They are all driven by PCLK (80 MHz). Each channel can be used as a timer and issue
interrupt independently.
Two channels PWM timers in one group share the same prescaler. Clock divider provides each
channel with 5 clock sources (1, 1/2, 1/4, 1/8, 1/16). Each channel receives its own clock signal from
clock divider which receives clock from 8-bit prescaler. The 16-bit counter in each channel receive
clock signal from clock selector and can be used to handle one PWM period. The 16-bit comparator
compares number in counter with threshold number in register loaded previously to generate PWM
duty cycle.
The clock signal from clock divider is called PWM clock. Dead-Zone generator utilize PWM clock as
clock source. Once Dead-Zone generator is enabled, output of two PWM timer in one group is
blocked. Two output pin are all used as Dead-Zone generator output signal to control off-chip power
device.
To prevent PWM driving output pin with unsteady waveform, 16-bit counter and 16-bit comparator are
implemented with double buffering feature. User can feel free to write data to counter buffer register
and comparator buffer register without generating glitch.
When 16-bit down counter reaches zero, the interrupt request is generated to inform CPU that time is
up. When counter reaches zero, if counter is set as toggle mode, it is reloaded automatically and start
to generate next cycle. User can set counter as one-shot mode instead of toggle mode. If counter is
set as one-shot mode, counter will stop and generate one interrupt request when it reaches zero.
The value of comparator is used for pulse width modulation. The counter control logic changes the
output level when down-counter value matches the value of compare register.
The PWM timer features are shown as below:
z Two 8-bit prescalers and two clock dividers
z Four clock selectors
z Four 16-bit counters and four 16-bit comparators
z Two Dead-Zone generator
7.20.1 PWM double buffering and reload automatically
W90P710 PWM Timers have a double buffering function, enabling the reload value changed for next
timer operation without stopping current timer operation. Although new timer value is set, current timer
operation still operate successfully.
The counter value can be written into PWM_CNR0, PWM_CNR1, PWM_CNR2, PWM_CNR3 and
current counter value can be read from PWM_PDR0, PWM_PDR1, PWM_PDR2, PWM_PDR3.
- 479 -
Publication Release Date: January 17, 2005
Revision A.2