Skip to content

STM32 Serial Flow Control #9534

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

Merged
merged 1 commit into from
Feb 4, 2019
Merged

STM32 Serial Flow Control #9534

merged 1 commit into from
Feb 4, 2019

Conversation

jeromecoutant
Copy link
Collaborator

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

@ciarmcom ciarmcom requested a review from a team January 29, 2019 16:01
@ciarmcom
Copy link
Member

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

@cmonr
Copy link
Contributor

cmonr commented Jan 29, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 30, 2019

Test run: SUCCESS

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

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.
I have updated the code

Crash occured when RTS=CTS=NC
Now we chek if used pins are the same UART as TX and RX
@0xc0170
Copy link
Contributor

0xc0170 commented Feb 1, 2019

CI started, Travis restarted

@mbed-ci
Copy link

mbed-ci commented Feb 1, 2019

Test run: SUCCESS

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

@0xc0170 0xc0170 merged commit ed53fe1 into ARMmbed:master Feb 4, 2019
@jeromecoutant jeromecoutant deleted the PR_FLOW branch February 4, 2019 14:44
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.

Flow control fails on STM32L476
6 participants