Other Parts Discussed in Thread: SYSCONFIG
Hi:
SDK: simplelink_cc13x2_26x2_sdk_4_40_00_44
Example :zed_sw_ota_client
MCU:CC1352P-2 LP
CCS version : 10
I used Uart2_callback mode,when received data,I set an evevt in my loop,and write a string.
Now,when I sent short data ,it's normal.But when I send long buffer(31 bytes),my loop will run twice occasionally


I have changed the RX ring buffer to 128.
Here is my code
uint8_t ch_uart;
// write a string
void hl_print_string(char *buffer)
{
char symbol[2] = "\r\n";
UART2_write(UartHandle,buffer,strlen(buffer),NULL);
UART2_write(UartHandle,symbol,2,NULL);
}
//open && init
void hl_uart_open(void)
{
UART2_Params_init(&UartParams);
UartParams.baudRate = 115200;
UartParams.readMode = UART2_Mode_CALLBACK;
UartParams.readCallback = AtProcess_processingLoop;
UartHandle = UART2_open(CONFIG_UART2_0, &UartParams);
if(UartHandle == NULL)
{
hl_print_string("Error opening the UART");
}
else
{
hl_print_string("UART open success");
status = UART2_read(UartHandle, &ch_uart, 1,NULL);
}
}
//read callback
void AtProcess_processingLoop(UART2_Handle _handle, void *_buf, size_t _size, void *userArg, int_fast16_t status)
{
if (status != UART2_STATUS_SUCCESS)
{
hl_print_string("Error");
}
UART2_read(UartHandle, &ch_uart, 1,NULL);
hlAppLoopEvents |= HL_ZED_UART_EVT;
Semaphore_post(appSemHandle);
}
//my loop in zcl_samplesw.c
void hlApp_event_loop(void)
{
if(hlAppLoopEvents & HL_ZED_1_EVT)
{
hlAppLoopEvents &= (~HL_ZED_HEART_EVT);
}
if(hlAppLoopEvents & HL_ZED_UART_EVT)
{
hl_print_string("uart");
hlAppLoopEvents &= (~HL_ZED_UART_EVT);
}
}