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.

Starterware/TMS320C6748: uartprintf is slow

Genius 13655 points
Part Number: TMS320C6748


Tool/software: Starterware

Hello Champs,

Customer found that the uartprintf function caused the EMAC loss packages.  The baudrate is 115200, transmit 4 bytes, the uartprintf will consume 40us in theory. But in fact, it will consume 1ms. 

Thanks.

Rgds
Shine

  • Moving this thread to the C67x forum.
  • Hi,

    I've notified the RTOS team. Feedback will be posted directly here.

    Best Regards,
    Yordan
  • Please note that Starterware UART_prints use UARTCharPut which is a blocking function and so are inefficient as this function checks indefinitely whether the Transmitter FIFO (THR regsiter in non-FIFO mode)is empty. If found empty, a byteis written into the THR register.

    One option to try is to replace the UARTCharPut with UARTCharPutNonBlocking which checks the THR only ones if it is empty it will write a byte to it if not then it will return False/error. the other option is integrate EDMA for writing to UART to speed them up. In case where you are having EMAC traffic and UART, we would typically recommend that you use an OS with a scheduler and UART prints in a lower priority task so that CPU can keep up with the EMAC packets and not be blocked due to UART tasks. We are refreshing the SDK for this device and will provide a LLD driver with EDMA implementation at the end of 2Q17. However, this will not be based on Starterware but will used bare-metal CSL drivers with TI RTOS.

    Regards,
    Rahul