Nordic's UARTE Zephyr driver does not properly implement part of Zephyr's UART driver API

The documentation for Zephyr's UART driver API can be found here.

https://docs.zephyrproject.org/latest/reference/peripherals/uart.html#c.uart_rx_enable

In particular, the `uart_rx_enable()` function is required to return `-EBUSY` if reception is already in progress.

Nordic's UARTE driver does not do this. A cursory glance at Nordic's driver code confirms that the driver does not check if the receiver was previously enabled before overwriting receiver settings that might currently be in use:

https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/serial/uart_nrfx_uarte.c#L796

Nordic's driver should check the value of `data->async->rx_enabled` at the beginning of the function and return early with the appropriate error code.

Parents Reply Children
No Data
Related