CONFIGURE UART ERROR IN NRF54L15

Hi everyone,
When I try configure UART (parity, data_bit, stop_bit, flow_ctrl), I have noticed error when I run in terminal: 
"

*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***

*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***

Failed to configure UART30, err -134

Failed to configure UART20, err -134
"

in file myuart.c: 

static struct uart_config uart_cfg = {
    .baudrate = 115200,
    .parity = UART_CFG_PARITY_NONE,
    .data_bits = UART_CFG_DATA_BITS_8,
    .stop_bits = UART_CFG_STOP_BITS_1,
    .flow_ctrl = UART_CFG_FLOW_CTRL_NONE,
};

void myuart_init(void)
{
    int ret;

    if (!device_is_ready(uart0_dev)) {
        printk("UART30 device not ready\n");
    }
    if (!device_is_ready(uart1_dev)) {
        printk("UART20 device not ready\n");
    }

    /* Configure UART20, UART30 */
    ret = uart_configure(uart0_dev, &uart_cfg);
    if (ret) {
        printk("Failed to configure UART30, err %d\n", ret);
    }
    ret = uart_configure(uart1_dev, &uart_cfg);
    if (ret) {
        printk("Failed to configure UART20, err %d\n", ret);
    }
};

Beside that, I configure UART in file devicetree:

&uart20 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart20_default>;
    pinctrl-names = "default";
};

&uart30 {
    compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart30_default>;
    pinctrl-names = "default";
};

You can explain for me with my error, please?

Thank for that,

Parents
  • Hello,

    The error messages "Failed to configure UART30, err -134" and "Failed to configure UART20, err -134" means that there is an issue with UART configuration.  

    How have you defined the pins for these nodes?

    I can see you have commented out the configuration part from the code.

    It should be there and after that call the UART API function uart_configure() function and pass it the variable of type uart_config.

    	int err = uart_configure(uart, &uart_cfg);
    
    	if (err == -ENOSYS) {
    		return -ENOSYS;
    	}

    If configuration is supported by the device, you will get negative errno code. (UART Driver - Nordic Developer Academy)

    Can you try these and see if there is any change?

Reply
  • Hello,

    The error messages "Failed to configure UART30, err -134" and "Failed to configure UART20, err -134" means that there is an issue with UART configuration.  

    How have you defined the pins for these nodes?

    I can see you have commented out the configuration part from the code.

    It should be there and after that call the UART API function uart_configure() function and pass it the variable of type uart_config.

    	int err = uart_configure(uart, &uart_cfg);
    
    	if (err == -ENOSYS) {
    		return -ENOSYS;
    	}

    If configuration is supported by the device, you will get negative errno code. (UART Driver - Nordic Developer Academy)

    Can you try these and see if there is any change?

Children
No Data
Related