This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF5340 - Reprogram UART baudrate at runtime

Hello,
I'm in Zephyr OS build v2.3.0 and NCS v1.3.0.
I need to reprogram UART0 baudrate at run time to 38400.
After having obtained the uart node

uart = device_get_binding("UART_0");

what the APIs to change the baudrate ?
The following one doesn't work, and a build warning states it is deprecated.

uart_line_ctrl_set(uart, LINE_CTRL_BAUD_RATE, 38400);

Thank you

Related