Hi there,
I am sending data to my EK-TM4C123GXL via UART from a java application. Both applications are set up to use the same uart configuration (baudrate, bit setup). Whenever the java application sends data chunks in small timesteps, the EK-TM4C123GXL will drop some of the data to keep up with the transmission speed of the java application.
Is this a problem with my programm or is this a hardware limitation (limited receive buffer or the likes)?
I set up my UART like this:
FPUEnable(); FPULazyStackingEnable(); SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); // // Enable the GPIO Peripheral used by the UART. // SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); // // Enable UART0 // SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); // // Configure GPIO Pins for UART mode. // GPIOPinConfigure(GPIO_PA0_U0RX); GPIOPinConfigure(GPIO_PA1_U0TX); GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); // // Use the internal 16MHz oscillator as the UART clock source. // UARTConfigSetExpClk(UART0_BASE, ROM_SysCtlClockGet(), UART_BAUD_RATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE)); SysCtlDelay(1000); UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);
And I receive my data chunks like this:
while (UARTCharsAvail(UART0_BASE)) { g_uartBuffer[g_uartBufferPosition++] = UARTCharGet(UART0_BASE); extractPacket(); }
I am not using interrupts, as I perform all processing work in a continuous while-loop that fetches new UART data whenever available. (fyi I was using interrupts before, but to no avail. The same problem occured beforehand).
Any help or clarification would be greatly appreciated. Thanks.