From b73ed71bc21c2fe286f283e1995eec9e247de971 Mon Sep 17 00:00:00 2001 From: Andy Killorin <37423245+Speedy6451@users.noreply.github.com> Date: Thu, 27 Mar 2025 11:22:28 -0400 Subject: [PATCH] trigger interrupt why don't the docs make it apparrent that this is possible, yet alone required? --- sampling.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);