Hi all,
I am using F28035 experimenter's kit. This is what I am trying to achieve.
I have ePWM1 timer in real time, generates an interrupt and in the ISR, I either toggle GPIO-16 (at 15.36khz) or keep it low. There is a Flag that enables this functionality.
I get an external interrupt on GPIO-0, in the ISR, I have to add a delay (this is a functionality I need) so I am just using DELAY_US(100) and then enables the Flag to toggle GPIO-16.
{I know that DELAY_US should be avoided in ISRs, but my external interrupt is 60hz and my GPIO-16 toggles only after the Flag is set and is much higher freq at 15.36khz, so it should not interfere the processing speeds, I think}
Below is the narrow pulse I am seeing, any ideas on this behavior?
__interrupt void epwm1_timer_isr(void) //15.36khz pwm
{
// Clear INT flag for this timer
EPwm1Regs.ETCLR.bit.INT = 1;
if (Flag == TRUE) {
GpioDataRegs.GPATOGGLE.bit.GPIO16 = 1; //turn on/off
}
else{
GpioDataRegs.GPACLEAR.bit.GPIO16 = 1;
}
// Acknowledge this interrupt to receive more interrupts from group 3
PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}
__interrupt void xint1_isr(void) //xint1 at 60hz
{DELAY_US(100);
Flag = TRUE;}
Thanks
Sandhya