
ML51/ML54/ML56
Sep. 01, 2020
Page
444
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
Edge-Aligned Type
6.8.4.3
In edge-aligned mode, the 16-bit counter uses single slop operation by counting up from 0000H to
{PWMnPH, PWMnPL} and then starting from 0000H. The PWM generator signal (PGn before PWM
and Fault Brake output control) is cleared on the compare match of 16-bit counter and the duty
register {PWMnH, PWMnL} and set at the 16-bit counter is 0000H. The result PWM output waveform
is left-edge aligned.
PWMnP (2nd)
PWMnP (1st)
PWMnCH01
(2nd)
PWMnCH01
(1st)
PG01 output
Load
PWMnCH01
(2nd)
Load
PWMnP (2nd)
PWMnCH01
(2nd)
duty valid
PWMnP (2nd) period
valid
12-bit counter
Figure 6.8-5 PWM Edge-aligned Type Waveform
The output frequency and duty cycle for edge-aligned PWM are given by following equations:
PWM frequency =
1
}
,
{
PWMnPL
PWMnPH
F
PWM
(F
PWM
is the PWM clock source frequency divided by
PWMDIV).
PWM high level duty =
1
}
,
{
}
,
{
PWMnPL
PWMnPH
PWMnCHxL
PWMnCHxH
.
Center-Aligned Type
6.8.4.4
In center-aligned mode, the 16-bit counter use dual slop operation by counting up from 0000H to
{PWMnPH, PWMnPL} and then counting down from {PWMnPH, PWMnPL} to 0000H. The PGn signal
is cleared on the up-count compare match of 16-bit counter and the duty register {PWMnH, PWMnL}
and set on the down-count compare match. Center-aligned PWM may be used to generate non-
overlapping waveforms.