Skip to content

drivers: uart: increase timeout precision in uart_rx_enable #30861

@nordic-krch

Description

@nordic-krch

Is your enhancement proposal related to a problem? Please describe.
Currently, uart_rx_enable gets timeout given in milliseconds. timeout refers to inactivity period which leads to UART_RX_RDY event. Millisecond resolution may significantly lower communication throughput if protocol requires ACK. For example, device transmits 10 bytes @1Mbaud, it takes ~100us but receiver has 1ms timeout so packet will be received after ~1100us. Another case is when hardware has inactivity detection.

Describe the solution you'd like
Change timeout to microseconds. Optionally, add inline function or macro for converting characters to microseconds.

** Alternative **
Change timeout to characters. It is baudrate independent and may be suitable for hardware inactivity detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementChanges/Updates/Additions to existing featuresarea: UARTUniversal Asynchronous Receiver-Transmitter

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions