Product specifications

R01AN0168ED0101 Rev. 01.01 10
Application Note
Chapter 2 General Notices
2.2.3 Functionality of GEN (Soft Reset)
GEN is always set on Hardware RESET.
By clearing the
GEN flag by software, the ISM macro is forcibly reset by soft-
ware. On this synchronous soft-reset,
all internal state machines, processing
(
GCE is automatically cleared) and also PWM is stopped and forced to reset
conditions. RAM contents, variables and parameters remain untouched, how-
ever. These can still be modified by software. Registers are keeping their val-
ues, except the following:
GCE, GCB, CZCn, CZDn, ZIPn and ZAFn are
cleared on soft-reset.
Cautions 1. As the soft-reset functionality is allowed in any state of the ISM macro,
inconsistencies of status flags with the internal state machines of ISM may
occur. For example, an interrupt pending flag may indicate an interrupt, but
the interrupt could no more be generated due to the soft-reset. For this
reason, after a soft-reset, it is the responsibility of the application software,
to clear status flags accordingly.
2. When Soft Reset is activated and deactivated, distortion on the PWM
outputs will occur, because the Soft Reset happens asynchronously. While
the distortion on activation of Soft Reset is unavoidable (PWM immediately
goes to recirculation via power), the distortion on restart after Soft Reset can
be avoided by software (disabling of port output while synchronously re-
activating the ISM).
3. As PWM value settings are not touched by the Soft Reset, PWM output will
continue immediately after Soft Reset is released, unless the corresponding
registers are cleared by software in advance.
2.3 How to generate a first PWM Output
ISM is almost ready-to-use after a Hardware RESET. Therefore, only few steps
are required to see an appropriate PWM output.
Enable the associated ports of the device for the corresponding peripheral
mode and
input mode.
•Set the Central Time Base speed by GTB.
Set the PWM duty cycle values by CHPn and CVPn.
Set the PWM quadrant by CQIn.
If there is no resistive load on the outputs, enable the Recirculation to VSS
by
IHRn and IVRn, so that push-pull operation is activated on the ports.
Notes 1. The usage of input mode must be combined with the associated port
setting to enable port control by the peripheral, i.e., the ISM.
In this way, ISM will select input or output direction depending on its
internal processing.
2. The Quadrant selects which of the 4 signals per channel will be applied the
PWM.
3. If Recirculation is not enabled, each port will only drive or not drive one
voltage level; i.e., the PWM toggles from and to high-impedance.