Other Parts Discussed in Thread: TM4C123GH6PM
Tool/software: Code Composer Studio
Hello,
I have issues with the UART of my board (TM4C123GH6PM) on CCS. I am calling UARTprintf to write some values on a serial monitor. When I write short integers everything is working but when I try to write 32 bits integers or long strings the code will halt in IntDefaultHandler. The UART is buffered, its size is 1024 and its speed is 115200. I tried to increase the size in uartstdio.h and the stack size but no success so far. If I try to use flush functions like UARTTxFlush(false) the code will still stall in IntDefaultHandler. Here's my code:
From UART.c:
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART); // Enable the GPIO port containing the pins that will be used.
SysCtlDelay(2); // Insert a few cycles after enabling the peripheral to allow the clock to be fully activated
GPIOPinConfigure(GPIO_RX_UART);
GPIOPinConfigure(GPIO_TX_UART);
// Configure for use as a peripheral function (instead of GPIO).
GPIOPinTypeUART(GPIO_UART_PIN_BASE, GPIO_RX_PIN_UART | GPIO_TX_PIN_UART);
UARTStdioConfig(GPIO_UART_NR_UART, 115200, SysCtlClockGet()); // Mode is set to 8N1 at 115200
UARTEchoSet(false);
while (UARTBusy(GPIO_UART_BASE_UART)) {
// Wait until UART is ready
}
}
And the part where I call UARTprintf:
uint32_t timer = millis();
UARTprintf("%d\n", timer);
Do you have any clue how I can fix this? Thank you