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 Flow Control #9534

Merged
merged 1 commit into from Feb 4, 2019

Conversation

Projects
None yet
6 participants
@jeromecoutant
Copy link
Contributor

jeromecoutant commented Jan 29, 2019

Description

This fixes #9525

Crash occurred when the flow control is set to disabled,
i.e. when serial_set_flow_control function was called with RTS and CTS values equal to "NC"

Correction is to check that used pin is using the same UART instance as TX and RX.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@cwq9999 @LMESTM

@LMESTM

LMESTM approved these changes Jan 29, 2019

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-maintainers Jan 29, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Jan 29, 2019

@jeromecoutant, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@cmonr

cmonr approved these changes Jan 29, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

cmonr commented Jan 29, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Jan 30, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 1
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Jan 30, 2019

targets/TARGET_STM/TARGET_STM32F0/serial_device.c Outdated
UARTName uart_rts = (UARTName)pinmap_peripheral(rxflow, PinMap_UART_RTS);
UARTName uart_cts = (UARTName)pinmap_peripheral(txflow, PinMap_UART_CTS);
MBED_ASSERT((UARTName)pinmap_merge(uart_rts, obj_s->uart) != (UARTName)NC);

This comment has been minimized.

@0xc0170

0xc0170 Jan 30, 2019

Member

why is this assert ? What will happen in the release build if asserts is not active, wont be merged.

This comment has been minimized.

@jeromecoutant

jeromecoutant Jan 31, 2019

Author Contributor

Good catch.
I have updated the code

STM32 Serial Flow Control
Crash occured when RTS=CTS=NC
Now we chek if used pins are the same UART as TX and RX

@jeromecoutant jeromecoutant force-pushed the jeromecoutant:PR_FLOW branch to eec7126 Jan 31, 2019

@cmonr cmonr added needs: CI and removed needs: review labels Jan 31, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

0xc0170 commented Feb 1, 2019

CI started, Travis restarted

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Feb 1, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 2
Build artifacts

@cmonr cmonr added ready for merge and removed needs: CI labels Feb 1, 2019

@0xc0170 0xc0170 merged commit ed53fe1 into ARMmbed:master Feb 4, 2019

27 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10215 cycles
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Feb 4, 2019

@jeromecoutant jeromecoutant deleted the jeromecoutant:PR_FLOW branch Feb 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.