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.

AM2631: How to keep PWM-interrupts working after a background breakpoint

Part Number: AM2631

I have a primary (FIQ) 40Khz interrupt based on PWM0 and a lower-priority (IRQ) 5Khz interrupt using PWM31. If I halt my application in the debugger, AND the halt happens to occur outside either one of these interrupts, then neither interrupt will occur again (until I reload the application). If I happen to halt within an interrupt, the interrupts keep working. I have the PWM TBCTL FREE_SOFT set to 0, so it should stop counting. If I manually clear the PWM event (ETCLR=1) in the debugger-register view, I can get the PWM-ISR to occur just one more time. I looked around in the VIM, PWM, and project-properties to see if there is anything additional I can configure to keep the interrupts running after a breakpoint. Do you have any suggestions as to what I can look at?

Thanks,

Jim

  • Hello Jim,

    Are the PWM interrupts configured as 'Pulse' interrupts in your application?

    Specifically, is the hwiPrms.isPulse set to 1 while constructing the Hwi params?

    Following is an example for configuring PWM interrupts:

    HwiP_Params_init(&hwiPrms);
    hwiPrms.intNum = CSLR_R5FSS0_CORE0_CONTROLSS_INTRXBAR0_OUT_0;
    hwiPrms.callback = &App_epwmIntrISR;
    hwiPrms.isPulse = APP_INT_IS_PULSE;
    status = HwiP_construct(&gEpwmHwiObject, &hwiPrms);

    SDK example: epwm_hr_duty_cycle

    With above settings, we observe the PWM interrupt keeps running after hitting breakpoint in background.

    Can you please try this example?

    Thanks

    K.Sanjeev