ST10R272L - PWM MODULE
188/320
PWMCON1 (FF32h / 99h)
SFR
Reset Value: 0000h
10.3
Interrupt request generation
The term ’channel interrupt’ refers to an interrupt request that can be generated by each of
the four channels on a multi-channel PWM module. The term ’module interrupt’ refers to the
interrupt vector that is assigned to all four channels.
The PWMCON0 register has individual interrupt enable and interrupt request flags for each
channel. When the individual enable flag PIEx of a channel is set, then the interrupt request
flag PIRx of that channel is set with the same signal that loads the shadow register with the
value from register PWx. This indicates that the newest PWM value was transferred to the
shadow latch for being compared to the timer contents, and that register PWx is now ’empty’
to receive the next value.
The module interrupt for all channels is controlled by the PWM Module Interrupt Control
register PWMIC. This register is organized like any other standard interrupt control register,
shown hereafter. If the module interrupt enable bit PWMIE is set, then the interrupt request
flag PWMIR is set if any of the channel interrupt request flags PIRx is set (provided this
interrupt is enabled through the respective PIEx bit). Software is used to then poll the
channel interrupt request flags to determine which channel(s) caused the interrupt.
Bit
Function
PEN3
PWM Channel 3 Output Enable Control
‘0’: Channel 3 output signal disabled, generate interrupt only
‘1’: Channel 3 output signal enabled
PM3
PWM Channel 3 Mode Control
‘0’: Channel 3 operates in mode 0 (edge aligned PWM)
‘1’: Channel 3 operates in mode 1 (center aligned PWM)
PS3
PWM Channel 3 Single Shot Mode Control Bit
‘0’: Channel 3 works in respective standard mode
‘1’: Channel 3 operates in single shot mode
5
4
3
2
1
0
11
10
9
8
7
6
15
14
13
12
-
-
-
-
-
-
rw
-
rw
-
-
-
-
PM3
-
-
-
-
-
PS3
-
-
-
-
-
PEN3
-
-
rw
-
-
-