Hi Ashley Duncan
I confirm that this is a bug in SDK 2.0 driver, I have reported to development team an I will keep you informed for any update that they give me.
A possible workaround is check the return status of UART_ReadBlocking inside the DbgConsole_Getchar function, and return -1 if a error flag is set
int DbgConsole_Getchar(void)
{
char ch;
if (s_debugConsole.type == DEBUG_CONSOLE_DEVICE_TYPE_NONE)
{
return -1;
}
if( kStatus_Success != (s_debugConsole.ops.rx_union.GetChar(s_debugConsole.base, (uint8_t *)(&ch), 1)))
{
UART_ClearStatusFlags(s_debugConsole.base, kUART_RxOverrunFlag |
kUART_NoiseErrorFlag |
kUART_FramingErrorFlag |
kUART_ParityErrorFlag);
return -1;
}
return ch;
}
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------