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.

AM5728: wrong char displayed in UART terminal at over 430kbps

Part Number: AM5728

Dear Champs,

My customer is using UART to print out debugging information to PC from IPU M4 core of AM5728 and found the characters were broken when they change baud-rate to 430kbps ~ 3,688Mbps.

There was no issue up to 230kbps, but the characters were broken from 430kbps. They used CSL API as below.

Could you please check their code in below?


void UARTConfigInit(uint32_t baseAddr, uint32_t baudRate, uint32_t wordLength,
                    uint32_t stopBit, uint32_t parity, uint32_t mode)
{
    uint32_t divisorValue = 0U, fifoConfig = 0U;

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

    /* Performing FIFO configurations. */
    /*
    ** - Transmit Trigger Level Granularity is 4
    ** - Receiver Trigger Level Granularity is 1
    ** - Transmit FIFO Space Setting is 56. Hence TX Trigger level
    **   is 8 (64 - 56). The TX FIFO size is 64 bytes.
    ** - The Receiver Trigger Level is 1.
    ** - Clear the Transmit FIFO.
    ** - Clear the Receiver FIFO.
    ** - DMA Mode enabling shall happen through SCR register.
    ** - DMA Mode 0 is enabled. DMA Mode 0 corresponds to No
    **   DMA Mode. Effectively DMA Mode is disabled.
    */

    fifoConfig = UART_FIFO_CONFIG(UART_TRIG_LVL_GRANULARITY_1,
                                  UART_TRIG_LVL_GRANULARITY_1,
                                  1,
                                  1,
                                  1,
                                  1,
                                  UART_DMA_EN_PATH_SCR,
                                  UART_DMA_MODE_0_ENABLE);

    /* Configuring the FIFO settings. */
    UARTFIFOConfig(baseAddr, fifoConfig);

    /* Performing Baud Rate settings. */
    /* Computing the Divisor Value. */
    divisorValue = UARTDivisorValCompute(UART_MODULE_INPUT_CLK,
                                         baudRate,
                                         mode,
                                         UART_MIR_OVERSAMPLING_RATE_42);

     UARTOperatingModeSelect(baseAddr, mode);

    /* Programming the Divisor Latches. */
    UARTDivisorLatchWrite(baseAddr, divisorValue);

    /* Switching to Configuration Mode B. */
    UARTRegConfigModeEnable(baseAddr, UART_REG_CONFIG_MODE_B);

    /* Programming the Line Characteristics. */
    UARTLineCharacConfig(baseAddr, (wordLength | stopBit), parity);

    /* Disabling write access to Divisor Latches. */
    UARTDivisorLatchDisable(baseAddr);

    /* Disabling Break Control. */
    UARTBreakCtl(baseAddr, UART_BREAK_COND_DISABLE);

    /* Uart enable */
    UARTOperatingModeSelect(baseAddr, mode);
    UARTIntEnable(baseAddr, 0x01);
}



    /*  call  */
    UARTConfigInit(DaqUartBaseAddr,  BAUD_RATE_460800, UART_WORD_LENGTH_8, UART_STOP_BIT_1,UART_NO_PARITY,UART_13x_MODE);

   

I found below e2e and should they use UART driver in PDK instead of CSL?

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/783693/rtos-tda2evm5777-uart-data-missing/2923383?tisearch=e2e-sitesearch&keymatch=UARTConfigInit#2923383 

Thanks and Best Regards,

SI.