Hi,
I wanted use the OUTSWAP feature with shadow of the deadband module of my device. But it seems that the OUTSWAP bits are not shadows while the others are.
Should this bitfield be shadowed?
For testing run a ISR at CTR=PRD (up-down counting mode), while reload of DBCTL is configured to CTR=0. So I would expect that the signals do not change when the ISR is executed.
The dead band generator is configured as shown in the following link, but S3 is set to one.
The delays are set to zero, so effectivly ePWM1A is passed to the point RED and ePWM1B is inverted and passed to FED.
ePWM1A has a smaler duty cycle that ePWM1B to visualise the signal.
Where the left cursors sits this is executed:
// EPwm1Regs.DBCTL.bit.OUTSWAP = 0x3; (swap outputs)
// EPwm1Regs.DBCTL.bit.OUT_MODE = 0x3; (enable inversion of B)
EPwm1Regs.DBCTL.all = 12331;
and at the right cursor:
// EPwm1Regs.DBCTL.bit.OUTSWAP = 0x0; (unswap outputs)
// EPwm1Regs.DBCTL.bit.OUT_MODE = 0x0; (disable inversion of B=
EPwm1Regs.DBCTL.all = 40;
As you can see on the scope the outputs are swaped immediately at the cursor, while the inversion of B occurs 50us later at CTR=zero.
CH7 =B
CH6 = A
Thanks,
Thomas.