Part Number: CC2640R2L
Hi Team,
When using the 2640 serial port, configure the callback mode and turn on the partial return function to receive an undetermined string,
normally the 2640 serial port receives a string that can be received as a packet.
However, when the sender sends a slightly larger delay between characters, the 2640 receive is subcontracted, which should be due to the partial return function.
I want to know what the default time for this serial port return function is and how it is configured.
// Callback function
static void UartreadCallback(UART_Handle handle, void *rxBuf, size_t size)
{
//UserUART_config[0].fxnTablePtr->writeFxn(Uarthandle,rxBuf,size);
UartReceiveDataProcess(rxBuf,size);
UserUART_config[0].fxnTablePtr->readFxn(Uarthandle,UserrxBuf,wantedRxBytes);
}
void UserUartInit(void)
{
// Initialize the UART driver.
UART_init();
// Create a UART with data processing off.
UART_Params_init(&Uartparams); //初始化是赋予一个默认值
Uartparams.baudRate = 9600;
Uartparams.writeDataMode = UART_DATA_BINARY; //可以选择二进制格式还是10进制格式
Uartparams.readMode = UART_MODE_CALLBACK;
Uartparams.readDataMode = UART_DATA_BINARY;
Uartparams.readCallback = UartreadCallback;
Uarthandle = UART_open(Board_UART0, &Uartparams);
if (Uarthandle == NULL)
{
// UART_open() failed
while (1)
;
}
UserUART_config[0].fxnTablePtr->controlFxn(Uarthandle, UARTCC26XX_CMD_RETURN_PARTIAL_ENABLE, NULL);
wantedRxBytes = 100;
UserUART_config[0].fxnTablePtr->readFxn(Uarthandle, UserrxBuf, wantedRxBytes);
}
Best Regards,
Galaxy

