I am running code on the LM4F120H5QR Launchpad Board. I have just updated one of my programs to run in UART_BUFFERED mode (Originally I was running without the UART_BUFFERED mode configured)
1) I have initialized UART0 to transmit and receive data.
2) I have predefined UART_BUFFERED under the project predefined symbols
3) I have defined "extern void UARTStdioIntHandler(void)" and "UARTStdioIntHandler" in the vector table in the startup_ccs.c file.
My problem is when I try to run a UARTprintf() statement. The code will allow me to print two characters, for example UARTprintf("12"). When I try to include more the two charters in the printf string, for example UARTprintf("123"), the debugger will trigger a FaultISR. When I look at the NVIC Fault Status I get the following:
NVIC_FAULT_STAT 0x00008200 Configurable Fault Status [Memory Mapped]
I look at the memory address which caused the fault and get the following
NVIC_MM_ADDR 0x02002F94 Memory Management Fault Address [Memory Mapped]
From looking at the data sheet, this appears to be the location reserved for ROM.
When I step through the program, the fault seems to be triggered when running the following statement in the uartstdio.c file.
MAP_IntDisable(g_ulUARTInt[g_ulPortNum]);
Any help on solving this issue would be greatly appreciated. I thought I had the UART_BUFFERED code figured out, but there is something I am missing. Below I have my UART initialization code just in case there is something I missed. If there is more code that is needed to resolve this issue please let me know.
/****************************************************
* UART Configuration
***************************************************/
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
GPIOPinConfigure(GPIO_PA0_U0RX);
GPIOPinConfigure(GPIO_PA1_U0TX);
GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
//Configure UART port for
//BAUD RATE = 115200
//Stop bits = 1
//Parity = None
UARTConfigSetExpClk(UART0_BASE, SysCtlClockGet(), 115200,
(UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
//UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX4_8, UART_FIFO_RX4_8); //set FIFO level to 8 characters
UARTFIFOEnable(UART0_BASE); //enable FIFOs
IntMasterEnable(); //enable processor interrupts
IntEnable(INT_UART0); //enable the UART interrupt
Thank you for your help,
Mike