MOTOROLA
Chapter 17. Modular Input/Output Subsystem (MIOS14)
17-55
MIOS14 Pulse Width Modulation Submodule (MPWMSM)
The MPWMSM is connected to an external, input/output signal. When in the disabled
mode, the POL bit (polarity) and the DDR bit (data direction) in the SCR register allow the
MPWMSM to be used as an I/O port.
17.10.3.10 MPWMSM Data Coherency
Byte accesses to MPWMPULR and MPWMPERR are supported, but are not recommended
as the transfer from the primary registers to the secondary registers are done as a 16-bit
word transfer.
For most MPWMSM operations, 16-bit accesses are sufficient and long word accesses
(32-bit) are treated as two 16-bit accesses, with one exception — a long word write to the
period/pulse width registers. In this case, if the long word write takes place within the PWM
period, there is no visible effect on the output signal and the new values stored in
MPWMPERR and MPWMPULR are ready to be loaded into the buffer registers at the start
of the next period. If, however, the long word write coincides with the end of the period,
then the transfer of values from the primary to the secondary registers is delayed until the
end of the next period; during this period the previous values are used for the period and
width. This feature enables updates of the period and pulse-width values without getting
erroneous pulses.
17.10.4
Modular Input/Output Bus (MIOS14) Interface
The MPWMSM is connected to all the signals in the read/write and control bus, to allow
data transfer from and to the MPWMSM registers, and to control the MPWMSM in the
different possible situations.
The MPWMSM is not using any of the 16-bit counter buses.
The MPWMSM uses the request bus to transmit to the request submodule.
17.10.5
Effect of RESET on MPWMSM
The MPWMSM is affected by reset according to what is described in the section related to
register description.
The MPWMPERR, MPWMPULR, and MPWMCNTR registers, together with the clock
prescaler register bits, must be initialized by software, since they are undefined after
hardware reset.
A value must be written to the MPWMCNTR (which writes the same value into the
MPWMPERR) and a pulse width value written to MPWMPULR, before the MPWMSCR
is written to. The latter access initializes the clock prescaler.