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.

CC1310: CC1310 - uart problems

Part Number: CC1310

Hi,

I am struggilng to set correct UART settings.

I have based my code on an example of uartecho but when I change some UART setting almost immediately I am ending in Main_assertHandler.

My simplelink SDK is 4.10.03.10. I am using RTOS with 2 tasks running.

I want to write and read byte by byte, I do not know how many bytes will be sent to me and when. The same is for write, my app will go on forever.

My settings for now are:

uartParams.baudRate = 115200;
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readMode = UART_MODE_CALLBACK;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readTimeout = 0;
uartParams.writeTimeout = 0;

uartParams.readCallback = &User_uartReadCallback;
uartParams.writeMode = UART_MODE_CALLBACK;
uartParams.writeCallback = &User_uartWriteCallback;

In one of my tasks I do:    

UART_read(hUart, &input, 1);

and read callback is:

void User_uartReadCallback(UART_Handle handle, void *buffer, size_t num)
{
...
UART_read(hUart, &input, 1);
}

Why am I keep getting Main_assert ?

Regards,