Other Parts Discussed in Thread: SYSCONFIG, CC3235SF, CC3235S
Hello,
I'm having trouble detecting Rx data in UART0.
This is my setup, I have configured UART0 through sysconfig like the capture below
I can send data out, and the device I'm interfacing with sends data back. I can see that in a logic analyzer.
However, I'm never reading anything. This is the code I'm using
UART_Handle uart;
UART_Params uartParams;
UART_Params_init(&uartParams);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.writeMode = UART_MODE_BLOCKING;
uartParams.readMode = UART_MODE_BLOCKING;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.readTimeout=1000;
uartParams.writeTimeout=1000;
uartParams.baudRate = 115200;
uart = UART_open(CONFIG_UART_EXPANSION, &uartParams);
//UART_control(uart, UART_CMD_RXENABLE, NULL);
if (uart == NULL) {
while (1);
}
char c = 0x0;
int32_t readCount;
uint8_t buff[64];
while (1) {
//FF00031D0C
char c1 = 0xff;
char c2 = 0x00;
char c3 = 0x03;
char c4 = 0x1d;
char c5 = 0x0c;
UART_write(uart, &c1, 1);
UART_write(uart, &c2, 1);
UART_write(uart, &c3, 1);
UART_write(uart, &c4, 1);
UART_write(uart, &c5, 1);
//UART_read(uart, &input, 1);
readCount=UART_read(uart, buff, 1);
}
readcount is always 0, and the UART_read operation always return when the timeout has expired.
Is there anything I'm doing wrong?
Thanks,
Ausias