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.

CC2642R-Q1: UART2 writeCallback does not trigger

Part Number: CC2642R-Q1


SDK version 6.40

I opened two UART channels, and after a period of time, the writeCallbck did not return ,How can I locate this issue.

I printed count while UART2_write and writeCallback,when the problem occurs, the writeCount is greater than callbackCount

The code is  as follows

UART2_Params params;
size_t bytesRead = 0;

/* Create a UART where the default read and write mode is BLOCKING */
UART2_Params_init(&params);
params.readMode = UART2_Mode_CALLBACK;
params.writeMode = UART2_Mode_CALLBACK;
params.readCallback = user_uart_uart2ReadCallback;
params.writeCallback = user_uart_uart2WriteCallback;
params.baudRate = 115200;

uartHandle2 = UART2_open(CONFIG_UART2_0, &params);
params.readCallback = user_uart_uartReadCallback;
params.writeCallback = user_uart_uartWriteCallback;
uartHandle = UART2_open(CONFIG_UART2_1, &params);
if (uartHandle2 == NULL) {
/* UART2_open() failed */
while (1);
}

if (uartHandle == NULL) {
/* UART2_open() failed */
while (1);
}

UART2_rxEnable(uartHandle2);
UART2_read(uartHandle2, uartRead2.buf, sizeof(uartRead2.buf), &bytesRead);
UART2_read(uartHandle, uartRead.buf, sizeof(uartRead.buf), &bytesRead);