This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x Starterware UART Baudrate Modification

Other Parts Discussed in Thread: AM3359

 Hello everyone,

I am currently working with an ICE AM3359 V2 board.

I use UART on a custom software based on Starterware library : everything is fine except when I try to change the baudrate.

The default baudrate is 115200 then I try to change it here : (line 27)

(console_utils_uart.c)

int32_t CONSOLEUtilsUartInit(void){
    int32_t status = E_FAIL;
    int32_t consoleUartInstNum = 0U;
    uartFifoCfg_t fifoConfig = UART_CONSOLE_DEFAULT;
    consoleUartInstNum = BOARDGetDeviceCtrlModInstNum(DEVICE_ID_CONSOLE, 0U);

    /* Configuring the system clocks for UART0 instance. */
    status = PRCMModuleEnable(CHIPDB_MOD_ID_UART, consoleUartInstNum,
                                FALSE);

    if(S_PASS == status)
    {
        /* Get the UART base address */
        gConsoleUtilsUartInstAddr = CHIPDBBaseAddress(CHIPDB_MOD_ID_UART,
                                     consoleUartInstNum);

        /* Performing the Pin Multiplexing for UART0 instance. */
        ConsoleUtilsUartPinMuxSetup(consoleUartInstNum);

        /* Performing a module reset. */
        UARTModuleReset(gConsoleUtilsUartInstAddr);

        /* Configuring the FIFO settings. */
        UARTFifoConfig(gConsoleUtilsUartInstAddr, &fifoConfig);

        /* Set the Baud Rate for the Console */
        UARTSetBaudRate(gConsoleUtilsUartInstAddr, UART_MODULE_INPUT_CLK, UART_BAUD_RATE_57600);
		
        /* Programming the Line Characteristics. */
        UARTLineCharacteristicConfig(gConsoleUtilsUartInstAddr, UART_CHAR_LENGTH_8BIT,
                                  UART_STOP_BIT_1, UART_PARITY_NONE);

        /* Disabling Break Control. */
        UARTBreakCtrlEnable(gConsoleUtilsUartInstAddr, FALSE);
    }

    return status;
}

But when I try to communicate using the new baudrate it won't work. However, if I use the default one it works even if this is not the one I choose.

Did somebody know if I missed something ?

Thank you in advance for your help,

Nicola