Skip to content

Nuvoton: Fix UART flow control CTS/RTS #9197

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
Jan 3, 2019

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented Dec 26, 2018

Description

This PR tries to enhance the case in which RTS pin output would drive to low when RTS is disabled. This allows the peer to be able to send data even though its corresponding CTS is still enabled.

Related targets

  • NUMAKER_PFM_NANO130
  • NUMAKER_PFM_NUC472
  • NUMAKER_PFM_M453
  • NUMAKER_PFM_M487/NUMAKER_IOT_M487
  • NUMAKER_PFM_M2351

Pull request type

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

Configure RTS pin outout to active low when RTS is disabled. This allows the peer to be able
to send data if its CTS is still enabled.
@ciarmcom
Copy link
Member

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

@ciarmcom ciarmcom requested a review from a team December 26, 2018 04:00
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Interesting. LGTM

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Waaait. Asking a question.

@cmonr
Copy link
Contributor

cmonr commented Dec 28, 2018

RTS pin output would drive to low when RTS is disabled.

Is there something amis with the way Nuvoton's hw flow control works that it needs a software bypass? I'm not sure why this fix is needed.

@deepikabhavnani deepikabhavnani requested a review from a team December 28, 2018 21:12
@ccli8
Copy link
Contributor Author

ccli8 commented Dec 29, 2018

@cmonr There're two reasons for this change:

  1. When RTS is first configured and configured to disabled, original control flow doesn't do RTS-related pin configuration. So RTS output pin status is dependent on previous pin configuration.
  2. When RTS is configured to disabled from enabled, Nuvoton's H/W would drive RTS output pin to low by default. But this default behavior may be changed elsewhere. So guarantee it by manually driving RTS output pin to low (except NANO130 which doesn't support this).

@cmonr
Copy link
Contributor

cmonr commented Jan 3, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 3, 2019

Test run: SUCCESS

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

@cmonr cmonr merged commit d425ec5 into ARMmbed:master Jan 3, 2019
@ccli8 ccli8 deleted the nuvoton_fix_uart-flow-control branch January 4, 2019 01:13
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.

6 participants