Tool/software: TI-RTOS
Hello,
I'm trying to develop an application to a Sitara AM335x ,with BIOS 6.52.0.12, and PDK 1.0.10 with the developer board ICEv2 i'm trying to use the interface UART3 (default STDIO) as a uart in binary mode.
I load the default icev2 pinmux.
In .cfg file :
var Uart = xdc.loadPackage('ti.drv.uart');
main.c:
boardCfg = /* Enabling Board Pinmux */ BOARD_INIT_PINMUX_CONFIG | BOARD_INIT_MODULE_CLOCK; /* Initialize Board */ status = Board_init(boardCfg); if (status != BOARD_SOK) { return (false); } UART_init(); UART_Params uartParams; UART_Params_init(&uartParams); uartParams.readMode = UART_MODE_BLOCKING; uartParams.writeMode = UART_MODE_BLOCKING; uartParams.readTimeout = 1000000; uartParams.writeTimeout = 1000000; uartParams.baudRate = 115200; uartParams.readMode = UART_DATA_BINARY; uartParams.writeMode = UART_DATA_BINARY; uartParams.readReturnMode = UART_RETURN_NEWLINE; uartParams.readEcho = UART_ECHO_OFF; uartParams.dataLength = UART_LEN_8; uartParams.stopBits = UART_STOP_ONE; uartParams.parityType = UART_PAR_NONE; tUartHnd = UART_open(3, &uartParams); if(tUartHnd == NULL) { while (1); }
So i disable the STDIO module and open the instance 3 as binary mode.
when i try to write to UART with:
UART_write(tUartHnd, (const char*)(pu8Buf), u16Size);
The characters '0xA' are changed to the characters '0xA 0xD'. I think that the interface UART3 is still in Text mode so all the New Line characters (0xA) are concatened by Carriage return characters (0xD).