-
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
UARTSerial writes even if tx is disabled #14498
Conversation
- The variables shadow SerialBase::_tx_enabled and SerialBase::_rx_enabled
@ghseb, thank you for your changes. |
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 can't think of why it would shadow it like this.
CI restarted |
@0xc0170 I think im not able to determine why the check failed. |
True, I'll restart now |
Test run: SUCCESSSummary: 10 of 10 test jobs passed |
There probably is a flaw in the |
The following snippet forces the issue:
I'd add a fix in 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.
Looks basically reasonable to me - just bikeshedding. Going to need this on master too I guess? Is there already another PR for that?
- Indicate that UARTSerial::update_rx_irq/update_tx_irq is not symmetric to UARTSerial::disable_rx_irq/disable_tx_irq
- The corresponding section is called from multiple locations now
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.
Looks good to me. But we need a version for BufferedSerial
on master too. Can't be making fixes only on the 5.15 branch.
Well I never used mbed-os-6 or |
Thjank you ! I'll retart CI |
Test run: FAILEDSummary: 1 of 10 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 1 of 10 test jobs failed Failed test jobs:
|
This pull request has automatically been marked as stale because it has had no recent activity. @ghseb, please carry out any necessary work to get the changes merged. Thank you for your contributions. |
I think this error is not related. |
I'll restart CI |
we got an issue it seems with lts example,, I'll investigate today. |
CI restarted (deprecated example was removed) |
Test run: SUCCESSSummary: 10 of 10 test jobs passed |
UARTSerial::_tx_enabled
andUARTSerial::_rx_enabled
shadowSerialBase::_tx_enabled
andSerialBase::_rx_enabled
.mbed-os/drivers/UARTSerial.h
Lines 299 to 300 in 0be7685
mbed-os/drivers/SerialBase.h
Lines 354 to 355 in 0be7685
This essentially leads to data being written out even if the serial is disabled, because
UARTSerial::_tx_enabled
is always true. In my opinion this is not the desired behaviour.mbed-os/drivers/source/UARTSerial.cpp
Lines 199 to 206 in 0be7685
Summary of changes
Remove shadowing variables.
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers