Hello,
i recently discovered a problem with the ADC routines of the tivaware driver library.
My code used to work fine until i imported a project from the examples (usb_dev_bulk) tried to compile it and flash it to the chip. Now every time i debug my previous code, it enters the FaultISR on the ADCReferenceSet(); function call. This didn't happen before. I did not make any changes to my code.
I attached the code i'm using below. Hopefully someone knows an answer to that problem. Thank you very much.
void main(void) {
// Initialization sequence --------------------------------------------------------------
SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
// activate and set up ADC module
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
SysCtlDelay(10);
//define ADC speed
SysCtlADCSpeedSet(SYSCTL_ADCSPEED_1MSPS);
// disable oversampling
ADCHardwareOversampleConfigure(ADC0_BASE, 0);
// setting the voltage reference to internal
ADCReferenceSet(ADC0_BASE, ADC_REF_INT);
// use sequencer 0 with timer triggering and highest priority
ADCSequenceConfigure(ADC0_BASE, 0, ADC_TRIGGER_TIMER, 0);
// define the sampling sequence for sequencer 0
ADCSequenceStepConfigure(ADC0_BASE, 0, 0, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 1, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 2, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 3, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 4, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 5, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 6, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 0, 7, ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
// enable adc interrupts for sequencer 0
IntEnable(INT_ADC0SS0);
ADCIntEnableEx(ADC0_BASE, ADC_INT_SS0);
IntMasterEnable();
// enable the sequencer
ADCSequenceEnable(ADC0_BASE, 0);