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.

LP-AM261: Issue in clearing the EPWM_ETFLG register

Part Number: LP-AM261


Tool/software:

Hi,

I'm using Sitara MCU AM261 Launchpad,

I have configured EPWM0_A and ADC EPWM_SOC_A event trigger interrupt, observed that EPWM_ETFLG[SOCA] and EPWM_ETFLG[INT] both got set after the interrupt, then I'm trying to clear the EPWM_ETFLG by writing EPWM_ETCLR[NT]=1 & EPWM_ETCLR[NT]=1 register. But ETFLAG is not cleared and I'm not getting interrupt after this.

void HAL_CP_vClearPwmInterrupt(void)
{
    HW_WR_REG16(CSL_CONTROLSS_ADC1_U_BASE + CSL_ADC_ADCINTFLGCLR, CSL_ADC_ADCINTFLGCLR_ADCINT1_MASK);   // Clear ADC conversion done flag
    HW_WR_REG16(PWM_MOT_CTRL_U_BASE_ADDR + CSL_EPWM_ETCLR, CSL_EPWM_ETCLR_INT_MASK);                    // Clear PWM interrupt flag
}

Kindly help me to resolve this issue.

Thanks in advance