Hello Everyone,
I have two boards with the same TM4C1231H6PZ processor that are acting differently with the same code, and I am hoping someone can explain why.
The questionable code is as follows:
.
.
.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOP);
while( ( !SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOP) ) && (PeriphStartup < 5u) )
{
PeriphStartup++;
}
SysCtlPeripheralReset(SYSCTL_PERIPH_GPIOP);
GPIOPinConfigure(GPIO_PD4_U6RX);
GPIOPinConfigure(GPIO_PD5_U6TX);
GPIOPinTypeUART(GPIO_PORTD_BASE, GPIO_PIN_4 | GPIO_PIN_5);
.
.
.
As you can see I have mistakenly enabled the GPIOP peripheral before accessing the GPIOD peripheral. On my original hardware this caused no problems. I then programed another processor with the exact same code, and I end up in the fault ISR with NVIC_FAULT_STAT_BFARV bit set and the NVIC_FAULT_STAT_PRECISE bit set. The address in the NVIC_HFAULT_STAT register is pointing the the GPIOPinConfigure call above.
At no point in the code is the GPIOD peripheral enabled.
My question is why did this not fail on the first board that I was using, and it does fail on the second? I would have expected this problem to have appeared on both processors.
I appreciate the help, and look forward to any responses!