Other Parts Discussed in Thread: C2000WARE
I am working on a project and I need to detect if the adc measurements are above a certain value and then take some further action.
All the interrupts work well but the interrupt function for the ADC-C post processing for limit detection is not been called although the PI Enable and Flag are been set. What can be the problem or is there something I am missing. The Code is for the initialization of the post processing is below
/**< Interrupts that are used in this example are re-mapped to ISR functions found within this file. */
Interrupt_register(INT_ADCC_EVT, &adc::adcCEventISR);
/**< configure trip for SOC0 for battery measurement c0 = batt_curr, c1 = batt_volt */
ADC_setupPPB (ADCC_BASE, ADC_PPB_NUMBER1, ADC_SOC_NUMBER0);
ADC_setPPBTripLimits (ADCC_BASE, ADC_PPB_NUMBER1, 3000, 0);
//ADC_enablePPBEvent (ADCC_BASE, ADC_PPB_NUMBER1, ADC_EVT_TRIPHI);
ADC_enablePPBEventInterrupt (ADCC_BASE, ADC_PPB_NUMBER1, ADC_EVT_TRIPHI);
ADC_clearPPBEventStatus (ADCC_BASE, ADC_PPB_NUMBER1, (ADC_EVT_TRIPHI | ADC_EVT_TRIPLO | ADC_EVT_ZERO));
ADC_setupPPB (ADCC_BASE, ADC_PPB_NUMBER2, ADC_SOC_NUMBER1);
ADC_setPPBTripLimits (ADCC_BASE, ADC_PPB_NUMBER2, 2900, 0);
//ADC_enablePPBEvent (ADCC_BASE, ADC_PPB_NUMBER2, ADC_EVT_TRIPHI);
ADC_enablePPBEventInterrupt (ADCC_BASE, ADC_PPB_NUMBER2, ADC_EVT_TRIPHI);
ADC_clearPPBEventStatus (ADCC_BASE, ADC_PPB_NUMBER2, (ADC_EVT_TRIPHI | ADC_EVT_TRIPLO | ADC_EVT_ZERO));
/**< enable higher level interrupt*/
Interrupt_enable(INT_ADCC_EVT);
The ADC-C measurements operates as expected but the interrupt function for the post processing is not been called. I assume the line below was not successful in the initialization
Interrupt_register(INT_ADCC_EVT, &adc::adcCEventISR);
Thanks
