Other Parts Discussed in Thread: C2000WARE
Dear experts,
I wrote a program to monitor a voltage using AMC1336-Q. I'm using filter 3 of SDFM and I am clocking SD-C3 using a clock I generated on one of the PWMs (5MHz).
The code enters sdfmDR3ISR whenever it gets data. I am cleaning interrupt flags in the ISR but it does not work. Can somebody help me?
The ISR is written below:
__interrupt void sdfmDR3ISR(void)
{
ESTOP0;
//
// Read filter result
//
filter3Result[loopCounter] =
(int16_t)(SDFM_getFilterData(SDFM1_BASE, SDFM_FILTER_3) >> 16U);
loopCounter++;
//
// Clear SDFM flag register (SDIFLG)
//
SDFM_clearInterruptFlag(SDFM1_BASE, SDFM_MASTER_INTERRUPT_FLAG |
SDFM_FILTER_1_NEW_DATA_FLAG |
SDFM_FILTER_2_NEW_DATA_FLAG |
SDFM_FILTER_3_NEW_DATA_FLAG |
SDFM_FILTER_4_NEW_DATA_FLAG);
//
// Disable the interrupt and enabling it later in main()
//
SDFM_disableInterrupt(SDFM1_BASE, SDFM_FILTER_3, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
//
// Acknowledge this interrupt to receive more interrupts from group 5
//
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
}