Hi, i am trying to use the ADC with the potentiometer that comes in the board, using the end of conversion interrupt but it does not go to the interrupt routine, this is the configuration i am using:
#define ADC16_INSTANCE (1)
#define ADC16_POTENTIOMETER_CHN (kAdc16Chn20)
#define ADC16_CHN_GROUP (0)
//ADC configuration
ADC16_DRV_StructInitUserConfigDefault(&adcUserConfig);
adcUserConfig.hwTriggerEnable = false;
adcUserConfig.continuousConvEnable = false;
ADC16_DRV_Init(ADC16_INSTANCE, &adcUserConfig);
adcChnConfig.chnIdx = (adc16_chn_t)ADC16_POTENTIOMETER_CHN;
#if FSL_FEATURE_ADC16_HAS_DIFF_MODE
adcChnConfig.diffConvEnable = false;
#endif /* FSL_FEATURE_ADC16_HAS_DIFF_MODE */
adcChnConfig.convCompletedIntEnable = true;
then i use the software trigger mode
ADC16_DRV_ConfigConvChn(ADC16_INSTANCE, ADC16_CHN_GROUP, &adcChnConfig);
and then i am just waiting in the adc interruption subroutine to turn on a led only(the LED is only to make sure the interruption is working) but never turns on so it's not working the interruption
void ADC1_IRQHandler(void)
{
GPIO_DRV_ClearPinOutput(kGpioLED2);
}
if i turn on the LED in the main program it turns on so the led is working, could anyone please help me if i should do something else or am i doing anything wrong? Thank you