
GR716-DS-UM, May 2019, Version 1.29
280
www.cobham.com/gaisler
GR716
The use of dual compare points enable generation of PWM patterns to be activated and disabled
within same PWM period. To invert a PWM signal activated and decapitated within same PWM
period requires user control. Figure 42 shows an example of using idle state usage for a PWM pattern
activated and deactivated within the same PWM period. The PWM period in the example is 0x0800
and PWM signal is assumed to be activated at 0x0200 and 0x0400.
30.2.5 Interrupts
Interrupts can programmed individually for each PWM to be generated at PWM compare match, at
PWM period match, or not generated at all. This is programmed in each PWM’s
PWM control regis-
ter.
Each PWM also has a 6-bit interrupt counter that can be used to scale down the frequency at
which the interrupts occur. When an interrupt is generated the bit in the
Interrupt pending register
for
the PWM in question is set. The bits in the
Interrupt pending register
stay set until software clears
them by writing 1 to them.
When an interrupt is generated, or when the interrupt scaler counter is increased, an output tick is gen-
erated on the core’s
tick
output signal. The output tick bit has the same index as the PWM in question.
30.3
Registers
The core is programmed through registers mapped into APB address space.
Table 335.
GRPWM registers
APB address offset
Register
0x00
Core control register
0x04
Scaler reload register
0x08
Interrupt pending register
0x0C
Capability register 1
0x10
Capability register 2
0x14
Reserved
0x18 - 0x1C
Reserved, always zero.
0x20*
PWM period register
0x24*
PWM compare register
0x28*
PWM dead band compare register
0x2C*
PWM control register
* This register is implemented once for every PWM (the LEON3FT microcontroller have support for 8 PWM), with an
offset of 0x10 from the previous PWM’s register. The functionality is the same for each PWM.
Figure 42.
Example of entering and leaving IDLE states.
PWM0
PWM1
t
n
t
n+1
t
n+2
t
n+3
t
n+4
t
n+5
t
n+6
t
n+7
PCOMP.COMP
PCOMP.COMP1
0x0200
0x0400
0xFFFF
0xFFFF
0x0200
0x0400
0xFFFF
0xFFFF
0x0800
0x8200
....
....