RFC: Unstable API Change: uart_async: Call UART_RX_RDY event after rx_disable() #25317
Labels
area: API
Changes to public APIs
area: UART
Universal Asynchronous Receiver-Transmitter
RFC
Request For Comments: want input from the community
Introduction
Proposal applies only to asynchronous API which currently has 3 implementations (
uart_sam0
,uart_nrfx_uart
anduart_nrfx_uarte
) and is marked asunstable
.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 withUART_RX_DISABLED
event. Data received between lastUART_RX_RDY
event and callingrx_disable()
is lost. It is based on the assumption thatrx_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 afterrx_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.
The text was updated successfully, but these errors were encountered: