Skip to content
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

Merged
merged 2 commits into from
Jun 19, 2017

Conversation

LMESTM
Copy link
Contributor

@LMESTM LMESTM commented Jun 8, 2017

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.

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.
@LMESTM
Copy link
Contributor Author

LMESTM commented Jun 8, 2017

I will rebase and take the opportunity to maybe put some code in common

@sg- sg- added the needs: work label Jun 8, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 9, 2017

Is this ready for review?

@LMESTM
Copy link
Contributor Author

LMESTM commented Jun 9, 2017

yes it is
optionnaly you may also check my last comment in the related issue

Copy link
Contributor

@0xc0170 0xc0170 left a 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);
Copy link
Contributor

@0xc0170 0xc0170 Jun 12, 2017

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

Copy link
Contributor Author

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

Copy link
Contributor

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 .

Copy link
Contributor Author

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 ?

@sg-
Copy link
Contributor

sg- commented Jun 15, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 567

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants