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

RFC: Unstable API Change: uart_async: Call UART_RX_RDY event after rx_disable() #25317

Closed
nordic-krch opened this issue May 14, 2020 · 3 comments
Labels
area: API Changes to public APIs area: UART Universal Asynchronous Receiver-Transmitter RFC Request For Comments: want input from the community

Comments

@nordic-krch
Copy link
Contributor

nordic-krch commented May 14, 2020

Introduction

Proposal applies only to asynchronous API which currently has 3 implementations (uart_sam0, uart_nrfx_uart and uart_nrfx_uarte) and is marked as unstable.

Problem description

Currently, when rx_disable() is called then receiver is stopped and all buffers used by the instance are released (UART_RX_BUF_RELEASED event) and user is notified that receiver is disabled with UART_RX_DISABLED event. Data received between last UART_RX_RDY event and calling rx_disable() is lost. It is based on the assumption that rx_disable() is called when user is no longer interested in receiving data. However, this may not always be the case. It may be that receiver is disabled due to out of band information from the transmitter about the end of a packet. In that case, receiver is closed to reduce power consumption and it is expected that valid data will be received.

Proposed change

UART_RX_RDY event should be triggered after rx_disable() if there is new data received. If user is not interested in that data it can be discarded.

Dependencies

3 implementations would need to be updated and the test suite.

@nordic-krch nordic-krch added area: UART Universal Asynchronous Receiver-Transmitter RFC Request For Comments: want input from the community area: API Changes to public APIs Breaking API Change Breaking changes to stable, public APIs labels May 14, 2020
@nordic-krch
Copy link
Contributor Author

@Sizurka @anangl @Mierunski @tbursztyka please let me know what do you think.

@nordic-krch nordic-krch removed the Breaking API Change Breaking changes to stable, public APIs label May 14, 2020
@nordic-krch
Copy link
Contributor Author

Realized that API is currently labeled as "unstable". Stable API Change label removed.

@nordic-krch nordic-krch changed the title RFC: API Change: uart: Call UART_RX_RDY event after rx_disable() RFC: API Change: uart_async: Call UART_RX_RDY event after rx_disable() May 14, 2020
@nordic-krch nordic-krch changed the title RFC: API Change: uart_async: Call UART_RX_RDY event after rx_disable() RFC: Experimental API Change: uart_async: Call UART_RX_RDY event after rx_disable() Jun 4, 2020
@nordic-krch nordic-krch changed the title RFC: Experimental API Change: uart_async: Call UART_RX_RDY event after rx_disable() RFC: Unstable API Change: uart_async: Call UART_RX_RDY event after rx_disable() Jun 4, 2020
@pabigot
Copy link
Collaborator

pabigot commented Aug 22, 2020

Seems this has been done.

@pabigot pabigot closed this as completed Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: UART Universal Asynchronous Receiver-Transmitter RFC Request For Comments: want input from the community
Projects
None yet
Development

No branches or pull requests

2 participants