-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32: serial: clear Overrun flag if it is set when checking if readable #4502
Conversation
Note that this could have side effects on the application as it would not be aware that data has been missed. This may be later solved by adding an error management parameter to the Serial API in mbed. The advantage is that the serial link can work again.
I will rebase and take the opportunity to maybe put some code in common |
Is this ready for review? |
yes it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one small comment
void serial_break_clear(serial_t *obj) | ||
{ | ||
(void)obj; | ||
//HAL_LIN_SendBreak(huart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this dead cone here? Please remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good question indeed ;-)
The diff somehow displays even though I haven't changed this line at all - it was there already before and I decided to leave it for now as this is not directly related to this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, shall be removed anyway. Can you ? Otherwise will be left in here .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather activate it than remove it ... but that would require some more testing which I could not do yet. Do you know of any test that is checking serial break ?
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Description
This PR is the answer to request in #899
In case of OVERRUN on a serial interface when using the polling method, the OVERRUN flag is reset so
that next characters can be received.
Status
READY
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.