MOTOROLA
PROGRAMMING REFERENCE
MMC2001
C-24
REFERENCE MANUAL
PWM IRQ — PWM Interrupt Request
This bit indicates that an interrupt was posted by a period compare. This bit can be
set by the user to post a PWM interrupt immediately for debugging purposes. This bit
is cleared automatically after it is read while set. If IRQ EN is cleared, this bit remains
cleared.
0 =
No interrupt posted
1 =
PWM period rolled over
IRQ EN — Interrupt Request Enable
This bit controls PWM interrupt generation. While this bit is low, the interrupt is dis-
abled.
0 =
PWM interrupt disabled
1 =
PWM interrupt enabled
LOAD — Load PWMPR and PWMWR
Setting this bit forces a new period. The period and width registers are loaded into the
comparator latches and the counter is reset. This bit is cleared automatically after the
load has been performed. The actual load occurs some time after the CPU writes this
bit, as the load occurs on the next rising PCLK edge following internal synchroniza-
tion. Forcing a load of the comparator latches and counter in this manner must be
done with caution to avoid unexpected pin behavior.
DATA — PWM Data
This bit indicates or controls the current state of the PWM pin. When the pin is config-
ured as a general-purpose output, the logical value written to this bit is used to drive
the pin. When the pin is configured as a general-purpose input, the pin value is
reflected by this bit. When the pin is configured in PWM mode, the bit reflects the
value being driven on the pin by the PWM logic.
DIR — Direction
This bit controls the direction of the pin when used as a GPIO pin. This bit has no
affect when MODE indicates PWM mode.
0 =
Pin is an input pin
1 =
Pin is an output pin
POL — Polarity
This bit controls the polarity of the pin when used as a PWM output pin. Normally, the
output pin is set high at period boundaries and goes low when a width compare event
occurs.
This bit is ignored if the pin is being used as a GPIO pin.
0 =
Normal PWM polarity
1 =
Inverted PWM polarity
MODE — PWM Mode
This bit selects whether the PWM pin is used for GPIO or for the PWM function.
0 =
General-purpose I/O mode
1 =
PWM mode
Freescale Semiconductor,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..