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

Projects
None yet
5 participants
@LMESTM
Contributor

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.

STM32: serial: clear Overrun flag if it is set when checking if readable
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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

0xc0170 commented Jun 9, 2017

Is this ready for review?

@LMESTM

This comment has been minimized.

Contributor

LMESTM commented Jun 9, 2017

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

@0xc0170

LGTM, just one small comment

void serial_break_clear(serial_t *obj)
{
(void)obj;
//HAL_LIN_SendBreak(huart);

This comment has been minimized.

@0xc0170

0xc0170 Jun 12, 2017

Member

why is this dead cone here? Please remove it

This comment has been minimized.

@LMESTM

LMESTM Jun 12, 2017

Contributor

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

This comment has been minimized.

@0xc0170

0xc0170 Jun 12, 2017

Member

OK, shall be removed anyway. Can you ? Otherwise will be left in here .

This comment has been minimized.

@LMESTM

LMESTM Jun 12, 2017

Contributor

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-

This comment has been minimized.

Member

sg- commented Jun 15, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Jun 16, 2017

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 567

All builds and test passed!

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jun 16, 2017

@theotherjimmy theotherjimmy merged commit 737a64c into ARMmbed:master Jun 19, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment