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.

f28335 ePWM ISR issue

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

I'm using the ePWM module ofthe  f28335 eZdsp to drive 4 coils of a stepper motor. ePWM1 module is configured to generate an interrupt every time its counter goes to zero. The corresponding interrupt service routine named "epwm1_isr" adjusts the period and compare value based on an external input. I stuffed &epwm1_isr into PieVectTable after the default initialization that is,

PieVectTable.EPWM1_INT = &epwm1_isr;

When I execute, I see that the interrupt flag set in PieCtrlRegs.PIEIER3 and in the global register IFR. and ePwm1Regs.ETPS.

However the code doesn't enter the ISR. I verifed this by setting a breakpoint in the ISR.

There is no problem in running another interrupt namely cpu_timer1. In fact ai can adjust the ePWM 1 period and duty cylce from the cpu_timer1 interrupt.  

When I loooked into the MAP file I see that the address of the epwm1_isr comes after that of rsvd_isr which is the default stub that is stuffed into the PieVectTable for unused interrupts. However when I look at the memory location of the epwm1_isr it seems that there is some overlap between the contents of the two isr's. How is that possible? There is some debugger generated comments next to the suspicious looking region but I can't make sense of it.

One thing I did do was to link RAML1 and RAML2 blocks into a single contiguous block to accomodate the .text section.

BTW I am executing in a RAM only environment.

Please help!

Ganga

 

  • You may want to check out the "ePWM Timer Interrupts" project included in ControlSuite under Devices->Delfino F2833x->Example Projects.It uses interrupts, and should help you with setting up yours...

     

  • Ganga:

    You may want to check out the ePWM example under ControlSuite:

    Devices->Delfino F2833x->Example Projects-> ePWM Timer Interrupts

    Once you are able to see that in action, you should be able to see if it helps with your project.

     

     

  • Todd,

    Thanks for the reply. I did try the ePWM UpDown Counting example and found that that works. I realized I had forgotten to enable the INT3 flag in the IER register. Silly mistake!

    Ganga