Hello,
I call the following function during the initialization period of my code to initialize the GPIO PB5 and its interrupt:
/** * Initialize ~DRDY pin as an input interrupt to trigger the read. * \note need to add the interrupt prototype to the NVIC **/ void ADC_initDRDYint(void) { // ~DRDY ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); ROM_GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_5); ROM_GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_5, GPIO_FALLING_EDGE); GPIOIntEnable(GPIO_PORTB_BASE, GPIO_INT_PIN_5); IntEnable(INT_GPIOB); }
If I step through it in the debugger it will get to the last line [ IntEnable(INT_GPIOB); ] just fine but if I step again it immediately goes to a hard fault and I end up in the infinite loop of FaultISR.
I use this same exact initialization and interrupt handler previously and it works just fine. Previously I was just reading data from an ADC and then scaling it before outputting it to a DAC. I have now added code for a PLL and it is hard faulting where it worked previously.
The code is attached.
0702.GTBE_pllTestHW_3-24-14.zip
What is causing the fault?
Regards,
Curtis