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
  • Hi

    I have reported this in an internal ticket, and our developers will review this and implement it as soon as possible. Thank you for the thorough bug report.

    Best regards,

    Simon

    PS: We will be short on staff during the Holiday period, and delayed replies must be expected. We will be back to full staff on January 3rd. Happy holidays and happy new year!

Reply
  • Hi

    I have reported this in an internal ticket, and our developers will review this and implement it as soon as possible. Thank you for the thorough bug report.

    Best regards,

    Simon

    PS: We will be short on staff during the Holiday period, and delayed replies must be expected. We will be back to full staff on January 3rd. Happy holidays and happy new year!

Children
No Data
Related