CC2340R5,SDK V912
当UART发生接收溢出错误OE,UART ROM API会自动禁止接收。如何能获取UART接收溢出错误,并重新使能接收?如下是目前使用的获取方法
1、当发生OE错误时,并没有停在设置断点处,而观察UART寄存器指示溢出
uartParams.readMode = UART2_Mode_CALLBACK;
uartParams.writeMode = UART2_Mode_CALLBACK;
uartParams.readCallback = uartReadCallback;
static void uartReadCallback(UART2_Handle handle, void *rxBuf, size_t size, void *userArg, int_fast16_t status)
{
if (status != UART2_STATUS_SUCCESS)
{
/* RX error occured in UART2_read() */
__NOP(); //这里设置断点
}
uartMessageLength = (uint16)(size);
BLEAppUtil_invokeFunctionNoData(sendDataOverBLE); //+++ Crucial to call from task and not interrupt context, otherwise the application aborts and crashes
}