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.
Hello everyone,
I have a question by debugging the example of "epwm_up_aq_cup01" , using CCS Version: 12.3.0.00005.
In this exsample the ePWM generate the interrupt by TBCTR = zero, see the code below :
EPwm1Regs.ETSEL.bit.INTSEL = ET_CTR_ZERO; // Select INT on Zero event
The interrupt should be called by TBCTR==0.
But as I am trying to check the value of EPwm1Regs.TBCTR when the "__interrupt void epwm1_isr(void)" is called (using a breakpoit).
The value of "EPwm1Regs.TBCTR" is not zero but 127 or something like that, and it is also not always 127, but 130, or 128.
Did I make some mistake by using the CCS or did I not understand the example correctly?
Thanks for your answers!
Hi Jie,
Thank you for your patience. A few questions about your EPWM configuration: in the EPWM Time Base Control Register, what are your emulation mode bits set to? Also, what are your EPWM time base clock dividers? And what line are you placing the breakpoint on? Just wanted to check these things first- what can happen is that several sysclk cycles occur between the time when the ISR is called and when the breakpoint halts the program which is when you are viewing the EPwm1Regs.TBCTR value.
Regards,
Allison