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.

CC2340R5: UART RX received message sent by TX

Part Number: CC2340R5

Tool/software:

I am testing CC2340R5 and currently encounter a situation. When I use UART for communication, the RX buffer will receive the message sent by TX or receive completely wrong message than expected., but this situation has not happened before.
But when I add new judgments or call functions in the UART thread, this situation occasionally occurs.
Is it related to the thread size? Or is there something wrong? Under what circumstances is memory out of range?

SDK : 7.40.00.64

CCS version: 12.7.0

Example Project : basic_ble

Ps. sem_wait_1s() is when I modified Semaphore_pend(); and changed it to 1000 System clock ticks, which is Timeout after 1000ms

UART2_Params_init(&uartParams);
uartParams.readMode = UART2_Mode_CALLBACK;
uartParams.readCallback = callbackFxn;
uartParams.baudRate = 9600;

uart = UART2_open(CONFIG_UART2_0, &uartParams);

if (uart == NULL)
{
    while (1) {}
}

UART2_write(uart, message, sizeof(message), NULL);
UART2_write(uart, rx_buffer, sizeof(rx_buffer), NULL);

sem_wait_1s(&sem);