diff --git a/sampling.c b/sampling.c index 22ce178..96093c8 100644 --- a/sampling.c +++ b/sampling.c @@ -57,11 +57,11 @@ void start_sampler() { 0); // specify the "Always" trigger // in the 0th step, sample channel 3 (AIN3) // enable interrupt, and make it the end of sequence - ADCSequenceStepConfigure(ADC1_BASE, 0, 0, ADC_CTL_CH3); + ADCSequenceStepConfigure(ADC1_BASE, 0, 0, ADC_CTL_CH3 | ADC_CTL_END | ADC_CTL_IE); // enable the sequence. it is now sampling - ADCSequenceEnable(ADC0_BASE, 0); + ADCSequenceEnable(ADC1_BASE, 0); // enable sequence 0 interrupt in the ADC1 peripheral - ADCIntEnable(ADC1_BASE, INT_ADC1SS0); + ADCIntEnable(ADC1_BASE, 0); // INT_ADC1SS0 IntPrioritySet(INT_ADC1SS0, 0); // set ADC1 sequence 0 interrupt priority // enable ADC1 sequence 0 interrupt in int. controller IntEnable(INT_ADC1SS0);