Skip to content

Check TXEMPTY flag instead of TXRDY flag on Serial.flush() #4173

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
Nov 18, 2015

Conversation

sandeepmistry
Copy link
Contributor

As suggested by @borisff in #4128.

From section "34.5.3.3 Transmitter Control" in the SAM3 data sheet:

When both the Shift Register and UART_THR are empty, i.e., all the characters written in UART_THR have been processed, the TXEMPTY bit rises after the last stop bit has been completed.

@sandeepmistry sandeepmistry added Component: HardwareSerial The hardware serial functionality of the core libraries Board: Arduino Due Applies only to the Due Architecture: SAM Applies only to the SAM microcontrollers (Due) labels Nov 17, 2015
@cmaglie cmaglie merged commit 435f679 into arduino:master Nov 18, 2015
@cmaglie cmaglie added this to the Release 1.6.7 milestone Nov 18, 2015
@sandeepmistry sandeepmistry deleted the sam-serial-flush-tx-empty branch July 18, 2016 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due) Board: Arduino Due Applies only to the Due Component: HardwareSerial The hardware serial functionality of the core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants