Other Parts Discussed in Thread: EK-TM4C123GXL
Tool/software: TI C/C++ Compiler
Hi,
I spent to much time, a day, trying to figure out which statement causes FaultISR, even I used the latest library.
Without using Tiva-C API everything works fine. ADC APIs must have wrong in coding.
Break points didn't help me too. Even I used ADC_CLOCK_SRC_PIOSC instead of ADC_CLOCK_SRC_PLL didn't help.
SysCtlClockSet(SYSCTL_SYSDIV_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN);
{// inside this block FaultISR occurs
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
ADCSequenceDisable(ADC0_BASE,1);
ADCSequenceDisable(ADC0_BASE,3);
ADCClockConfigSet(ADC0_BASE, ADC_CLOCK_SRC_PLL | ADC_CLOCK_RATE_HALF,1);
ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
ADCSequenceEnable(ADC0_BASE, 3);
ADCIntClear(ADC0_BASE, 3);
}