AnsweredAssumed Answered

ADC interrupt configuration in twrk60d100m with KSDK

Question asked by Jose Caballero on Aug 5, 2017
Latest reply on Aug 14, 2017 by Jorge Antonio Alcala Vazquez

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

adcUserConfig.hwTriggerEnable = false;
adcUserConfig.continuousConvEnable = false;
ADC16_DRV_Init(ADC16_INSTANCE, &adcUserConfig);
adcChnConfig.chnIdx = (adc16_chn_t)ADC16_POTENTIOMETER_CHN;
adcChnConfig.diffConvEnable = false;
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)



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