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.

RTOS/AM5728: UART driver issue with binary data

Part Number: AM5728

Tool/software: TI-RTOS

Hi everybody , 

Uart is working fine  when sending /receiving ASCII . I need to transfer binaries  and in this case  UART data exchange with baud-rate 115200[bps] has a problem  We faced a problem with the TI driver UART_read2(): if we exchange binary data, then we identify that the read-callback function is being called the minute the Sitara receives the character 0x0A, which is the line feed character.

in Uart_parameter I set to Binary , but issue is still there : any suggestion/idea ?

thank you very  much

regards

Carlo

  • The RTOS team have been notified. They will respond here.
  • Carlo,

    Can you provide the sequence in which the UART APIs are being called from the application. If you are planning to use UART driver in binary format, you should not be initializing UART_StdioInit in the application or from the BOARD_init. UART_stdio Init should only be called for the UART that is managing the debug UART logging in the system.

    For all other UARTs, you should use UART initialization sequence as describe in UART_test_read_write in the UART test case in the UART driver. If you are using UARTStdio functionality and use UART_gets API then you are likely to see this behavior as the driver interprets the character as

    ** 0xD - ASCII value of Carriage Return.
    ** 0xA - ASCII value of Linefeed.
    ** 0x1B - ASCII value of ESC character.

    If possible please also provide the UART params and the UART HWAttr configured so we understand the setup better.

    Regards,
    Rahul
  • Carlo,

    Can you please ask the customer to also set the readReturnMode in the UART_Params to UART_RETURN_FULL as follows and try with their setup:

    uartParams.readReturnMode = UART_RETURN_FULL;

    This is likely to be the reason due to which the driver jumps to call back function when new line character is received. Let us know if this continues to be an issue with their setup.

    Regards,
    Rahul
  • Hello Rahul,

    Thank you very much for that hint. The problem is solved by your suggestion, changing the "uartParams.readReturnMode" setting.

    Regards,
    Andreas
  • Glad to know you are able to make progress with the update to the Params.

    Regards,
    Rahul