
Mini57
Apr. 06, 2017
Page 225 of 475
Rev.1.00
MINI5
7
S
E
RI
E
S
TECH
NIC
A
L R
E
F
E
RE
N
CE
MA
N
UA
L
6.8 Enhanced PWM Generator (EPWM)
6.8.1
Overview
The Mini57 series has built in one PWM unit which is specially designed for motor driving control
applications. The PWM unit supports six PWM generators which can be configured as six
independent PWM outputs, PWM0~PWM5, or as three complementary PWM pairs, (PWM0,
PWM1), (PWM2, PWM3) and (PWM4, PWM5) with three programmable dead-zone generators.
Every complementary PWM pairs share one clock divider providing nine divided frequencies (1,
1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256) for each channel. Each PWM output shares one 16-
bit counter for PWM period control, and 16-bit comparators for PWM duty control. The six PWM
generators provide fourteen independent PWM interrupt flags which are set by hardware when
the corresponding PWM period counter comparison matched period and duty. Each PWM
interrupt source with its corresponding enable bit can request PWM interrupt. The PWM
generators can be configured as One-shot mode to produce only one PWM cycle signal or Auto-
reload mode to output PWM waveform continuously.
To prevent PWM driving output pin with unsteady waveform, the 16-bit period up counter and 16-
bit comparator are implemented with double buffer. When user writes data to counter/comparator
buffer registers, the updated value will be loaded into the 16-bit counter/comparator at the end of
current period. The double buffering feature avoids glitch at PWM outputs.
Besides PWM, Motor controlling also need Timer, ACMP and ADC to work together. To control
motor more precisely, some registers are provided to configure not only PWM but also Timer,
ADC and ACMP. By doing so, it can save more CPU time and control motor with ease especially
in BLDC.
6.8.2
Features
Supports one PWM clock timer and one 9 level Divider (1, 1/2, 1/4, 1/8, 1/16, 1/32,
1/64, 1/128, 1/256).
Supports six independent 16-bit PWM duty control units with maximum six port pins:
Six independent PWM outputs
– PWM0, PWM1, PWM2, PWM3, PWM4, and
PWM5
Three complementary PWM pairs, with each pin in a pair mutually complement
to each other and capable of programmable dead-zone insertion
– (PWM0,
PWM1), (PWM2, PWM3) and (PWM4, PWM5)
Three synchronous PWM pairs, with each pin in a pair in-phase
– (PWM0,
PWM1), (PWM2, PWM3) and (PWM4, PWM5)
Supports group function.
Supports one-shot (only edge alignment mode) or auto-reload mode PWM
Supports 16-bit resolution PWM counter
Supports Edge-aligned and Center-aligned mode
Supports Programmable dead-zone insertion between complementary paired PWMs
Supports hardware fault brake protections
Two Interrupt source types:
one type is brake directed, and one type can resume from brake.