This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I'm running an application on a F28377S. If I enable shadowing of the ePWM AQCTLA/B registers it seems like the active registers are sometimes not loaded correctly. I set up the shadowing the following way:
EPwm7Regs.AQCTL.bit.SHDWAQAMODE = 1; // Shadow mode - operates as a double buffer. All writes via the CPU access Shadow register. EPwm7Regs.AQCTL.bit.SHDWAQBMODE = 1; // Shadow mode - operates as a double buffer. All writes via the CPU access Shadow register. EPwm7Regs.AQCTL.bit.LDAQASYNC = 0; // Shadow to Active Load of AQCTLA occurs according to LDAQAMODE EPwm7Regs.AQCTL.bit.LDAQBSYNC = 0; // Shadow to Active Load of AQCTLA occurs according to LDAQBMODE EPwm7Regs.AQCTL.bit.LDAQAMODE = 0; // Load on CTR = Zero EPwm7Regs.AQCTL.bit.LDAQBMODE = 0; // Load on CTR = Zero
Reading the AQCTLA/B registers with JTAG shows correct values in the registers, however my PWM outputs are flat.
I also have shadowing enabled on TBPRD/CMPA/CMPB registers, loading on zero crossing. These are working correctly all the time.
My workaround is to load AQCTLA/B on SYNC (AQCTL.bit.LDAQASYNC=2). Any idea about why loading on ZRO (AQCTL.bit.LDAQASYNC=0) only works randomly?
Oyvind,
There is a note in the user's guide about possible contention if an AQ register update happens at the same time as an AQ edge. Take a look at p.1595 of the User's Guide:
http://www.ti.com/lit/ug/spruhm8e/spruhm8e.pdf
If CMPA or CMPB are zero this might happen. Could this be the problem?
Regards,
Richard
Hi Richard.
CMPA and CMPB are always non-zero (except for after reset, and operation after reset has not been a problem. Shadowing is not enabled before CMPx are set to non-zero values).
However I'm using the AQCTLA.bit.ZRO qualifier. In the note you referred to I can't see that this is specifically mentioned as a problem, but I guess that it is a similar case.
Regards,
Øyvind