Modular Input/Output Subsystem (MIOS14)
MPC561/MPC563 Reference Manual, Rev. 1.2
Freescale Semiconductor
17-73
Figure 17-45. MIOS14 Example: Double Edge Output Compare
17.13.4 MIOS14 Output Pulse Width Modulation with MDASM
Output waveforms can be generated with any duty cycle without software involvement. The software sets
up a MDASM with the compare times for the rising and falling edges and they are automatically repeated.
The software does not need to respond to interrupts to generate continuous pulses. The frequency may be
selected as the frequency of a free-running counter time-base, times a binary multiplier selected in the
MDASM. Multiple PWM outputs can be created from multiple MDASMs and share one counter
submodule, provided that the frequencies of all of the output signals are a binary multiple of the time-base
and that the counter submodule is operating in a free-running mode. Each MDASM has a software
selectable “don’t care” on high-order bits of the time-base comparison so that the frequency of one output
can be a binary multiple of another signal. Masking the time-base serves to multiply the frequency of the
time-base by a binary number to form the frequency of the output waveform. The duty cycle can vary from
one cycle to 64-Kbyte cycles. The frequency can range from 0.48 Hz to 156 KHz, though the resolution
decreases at the higher frequencies to as low as seven bits. The generation of output square wave signals
is of course the special case where the high and low times are equal.
When an MMCSM is used to drive the time-base, the modulus value is the period of the output PWM
signal.
shows such an example. The polarity of the leading edge of an output waveform is
programmable for a rising or a falling edge. The software selects the period of the output signal by
programming the MMCSM with a modulus value. The leading edge compare value is written into register
A by software and the trailing edge time is written into register B1. When the leading edge value is
reached, the content of register B1 is transferred to register B2, to form the next trailing edge value.
Subsequent changes to the output pulse width are made by writing a new time into register B1. Updates to
the pulse width are always synchronized to the leading edge of the waveform.
16-bit Up-Counter
Submodule Bus
Clock
Select
16-bit Compare B
Output
Flip-Flop
Output
Signal
16-bit Compare A
16-bit Register B2
16-bit Register A
Output
Compare
Interrupt
on
From
Prescaler
or Pin
Trailing
Bus
Select
Edge
Two
16-bit
Counter
Buses
MIOS14 Double Action Submodule
in OCB mode (MOD3 - MOD0 = 0b0100)
MIOS14 Modulus Counter Submodule
Summary of Contents for MPC561
Page 84: ...MPC561 MPC563 Reference Manual Rev 1 2 lxxxiv Freescale Semiconductor...
Page 144: ...Signal Descriptions MPC561 MPC563 Reference Manual Rev 1 2 2 46 Freescale Semiconductor...
Page 206: ...Central Processing Unit MPC561 MPC563 Reference Manual Rev 1 2 3 62 Freescale Semiconductor...
Page 302: ...Reset MPC561 MPC563 Reference Manual Rev 1 2 7 14 Freescale Semiconductor...
Page 854: ...Time Processor Unit 3 MPC561 MPC563 Reference Manual Rev 1 2 19 24 Freescale Semiconductor...
Page 968: ...Development Support MPC561 MPC563 Reference Manual Rev 1 2 23 54 Freescale Semiconductor...
Page 1144: ...Internal Memory Map MPC561 MPC563 Reference Manual Rev 1 2 B 34 Freescale Semiconductor...
Page 1212: ...TPU3 ROM Functions MPC561 MPC563 Reference Manual Rev 1 2 D 60 Freescale Semiconductor...
Page 1216: ...Memory Access Timing MPC561 MPC563 Reference Manual Rev 1 2 E 4 Freescale Semiconductor...