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.

Counter Compare Register Update

Other Parts Discussed in Thread: TMS320F28035

Hi,

I'm using TMS320F28035 fixed-point 32-bit MCU.

In my project,  the ePWMs are configured in Up-counting mode. They are the same fixed timebase period, but varying duty cycles. I have to update counter compare registers of two ePWMs as the result of my control loop.

They are supposed to be complementary.

The problem is that, if I update the counter-compare registers  in CLA, they give identical results, which is wrong. (they must be complementary according to Action Qualifier)

So, for testing purpose, I added an EPWM ISR to my project, and in this ISR, it reads the result of the control loop from CLA, and updates CMPA, CMPB in EPWM_ISR. (note: No CMPA CMPB updating job in CLA anymore). And it works well.

I am wondering why it didn't work in CLA ?

I am aware of the CLA is floating-point.  So, I have to convert the data to interger and then shift to the left for 16 bits.

I used to be able to update CMPA in CLA for another project, and it work fine.

I think the problem occured when CMPB got involed in this.

Hope someone can help me with this,

Thank you.