When configuring the ADC sequencer to trigger always the processor goes into the Fault ISR.
Here's the code for configuration the ADC sequencer:
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
ADCHardwareOversampleConfigure(ADC0_BASE, 16);
ADCClockConfigSet(ADC0_BASE, ADC_CLOCK_SRC_PLL | ADC_CLOCK_RATE_FULL, 6);
GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_2);
GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_3);
ADCSequenceConfigure(ADC0_BASE, 0, ADC_TRIGGER_ALWAYS, 0);
ADCSequenceStepConfigure(ADC0_BASE, 0, 0, ADC_CTL_CH0);
ADCSequenceStepConfigure(ADC0_BASE, 0, 1, ADC_CTL_CH1);
ADCSequenceStepConfigure(ADC0_BASE, 0, 2, ADC_CTL_IE | ADC_CTL_END);
ADCSequenceEnable(ADC0_BASE, 0);
Here's the code to get the ADC reading:
while(!ADCIntStatus(ADC0_BASE, 0, false)) { }
// Read the value from the ADC.
ADCSequenceDataGet(ADC0_BASE, 0, adcValues);
Is there something I'm missing in the configuration? Or any ideas why this isn't working?
Thanks,