Since I've had excellent support from the forum in the past I thought I would try again. Kind thanks, all.
I am working with the above launchpad board initially and am trying to set up two sequencers to do identical work however I want to use the second ADC (ie ADC1) to convert the last pair of four channels. I realise on the Launchpad board, ADC Ch3 is not brought out to a pin but that's not important to me in developing code.
// Enable the ADCs internally SysCtlPeripheralEnable( SYSCTL_PERIPH_ADC0 ); SysCtlPeripheralEnable( SYSCTL_PERIPH_ADC1 ); #ifdef LAUNCHPAD //Enable Pin inputs SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOE ); GPIOPinTypeADC( GPIO_PORTE_BASE, GPIO_PIN_3 | GPIO_PIN_2 | GPIO_PIN_1 | GPIO_PIN_0 ); #else // for our board #endif // Enable the first sample sequencer to capture the value of channel 0 when // the processor trigger occurs. ADCSequenceDisable( ADC0_BASE, SEQ1 ); ADCSequenceConfigure( ADC0_BASE, SEQ1, ADC_TRIGGER_ALWAYS, PRIORITY1 ); ADCSequenceStepConfigure( ADC0_BASE, SEQ1, STEP0, ADC_CTL_CH0 ); ADCSequenceStepConfigure( ADC0_BASE, SEQ1, STEP1, ADC_CTL_CH1 | ADC_CTL_IE | ADC_CTL_END ); // And do the same for the second sequencer ADCSequenceDisable( ADC1_BASE, SEQ2 ); ADCSequenceConfigure( ADC1_BASE, SEQ2, ADC_TRIGGER_ALWAYS, PRIORITY0 ); ADCSequenceStepConfigure( ADC1_BASE, SEQ2, STEP0, ADC_CTL_CH2 ); ADCSequenceStepConfigure( ADC1_BASE, SEQ2, STEP1, ADC_CTL_CH3 | ADC_CTL_IE | ADC_CTL_END ); //setup interrupts ADCIntRegister(ADC0_BASE, SEQ1, ADCinterruptSequencer1); ADCIntRegister(ADC1_BASE, SEQ2, ADCinterruptSequencer2); ADCIntClear(ADC0_BASE, SEQ1); ADCIntClear(ADC1_BASE, SEQ2); ADCIntEnable(ADC0_BASE, SEQ1); ADCIntEnable(ADC1_BASE, SEQ2); }
What I have done is a complete carbon copy of the working code seen above for ADC0. However, the interrupt is never called (ie the interrupt routine is never entered, so I have not bothered to include it here).
Perhaps someone has some initial thoughts where I may be going wrong or if ADC1 requires special configuration that ADC0 does not.
Thanks in advance