![NXP Semiconductors SAFE ASSURE Qorivva MPC5601P Reference Manual Download Page 690](http://html.mh-extra.com/html/nxp-semiconductors/safe-assure-qorivva-mpc5601p/safe-assure-qorivva-mpc5601p_reference-manual_1721898690.webp)
Chapter 25 FlexPWM
MPC5602P Microcontroller Reference Manual, Rev. 4
690
Freescale Semiconductor
25.8.3
Counter synchronization
Referring to
, the 16-bit counter will count up until its output equals VAL1, which specifies
the counter modulus value. The resulting compare causes a rising edge to occur on the Local Sync signal,
which is one of four possible sources used to cause the 16-bit counter to be initialized with INIT. If Local
Sync is selected as the counter initialization signal, then VAL1 within the submodule effectively controls
the timer period (and thus the PWM frequency generated by that submodule) and everything works on a
local level.
Figure 25-39. Submodule timer synchronization
The Master Sync signal originates as the Local Sync from submodule 0. If configured to do so, the timer
period of any submodule can be locked to the period of the timer in submodule 0. The VAL1 register and
associated comparator of the other submodules can then be freed up for other functions such as PWM
generation, output compares, or output triggers.
The EXT_SYNC signal originates either on- or off-chip, depending on the system architecture. This signal
may be selected as the source for counter initialization so that an external source can control the period of
all submodules.
If the Master Reload signal is selected as the source for counter initialization, then the period of the counter
will be locked to the register reload frequency of submodule 0. Since the reload frequency is usually
commensurate to the sampling frequency of the software control algorithm, the submodule counter period
will therefore equal the sampling period. As a result, this timer can be used to generate output compares
or output triggers over the entire sampling period, which may consist of several PWM cycles. The Master
Reload signal can only originate from submodule 0.
The counter can optionally initialize upon the assertion of the FORCE_OUT signal assuming that the
FORCE_EN bit is set. As indicated by
, this constitutes a second init input into the counter,
which causes the counter to initialize regardless of which signal is selected as the counter init signal. The
16-bit counter
INIT
Init
16-bit
comparator
VAL1
Mod Compare
Processing
Logic
Master Reload
EXT_SYNC
Master Sync
0
1
2
3
INIT_SEL
Local Sync
Master Sync
(from submod0
only)
Submodule Clock
FORCE_OUT
FORCE_EN