Higher baud rate support on nrf5340

Hi,

Just wanted to know if nrf5340dk supports for UART baud rates until 512kbps.?
And specific baud rates configuration like 122800.?

If yes, is it simply configured as in below.? or takes different configuration.?

#include <zephyr/kernel.h>
#include <zephyr/drivers/uart.h>

const struct device *uart_dev;

void main(void)
{
    uart_dev = device_get_binding("UART_0");
    if (!uart_dev) {
        printk("UART device not found!\n");
        return;
    }

    struct uart_config cfg = {
        .baudrate = 122800,
        .parity = UART_CFG_PARITY_NONE,
        .stop_bits = UART_CFG_STOP_BITS_1,
        .data_bits = UART_CFG_DATA_BITS_8,
        .flow_ctrl = UART_CFG_FLOW_CTRL_NONE,
    };

    if (uart_configure(uart_dev, &cfg) != 0) {
        printk("Failed to configure UART\n");
    } else {
        printk("UART configured to 122800 baud rate\n");
    }
}


Parents Reply Children
No Data
Related