nrf52840 Dongle - Uart communication fails

Hi,

I am using the nrf52840 dongle board just to startup a project. I connected to the dongle a UART-USB converter to the dongle... but when I enable the UART into the firmware, nothing works (I don't have the debugger, so I don't know exactly what is not working.

The prj file is:

CONFIG_GPIO=y
CONFIG_I2C=y

# Just for debug!
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y

CONFIG_BT=y
CONFIG_BT_EXT_ADV=y
CONFIG_BT_PER_ADV=y
CONFIG_LOG=y
CONFIG_BT_DEVICE_NAME="Test Periodic Advertising"

The Overlay:

&pinctrl {

    uart1_default: uart1_default {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 2)>;
        };
        group2 {
            psels = <NRF_PSEL(UART_RX, 0, 29)>;
            bias-pull-up;
        };
    };

    uart1_sleep: uart1_sleep {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 2)>,
                    <NRF_PSEL(UART_RX, 0, 29)>;
            low-power-enable;
        };
    };

    i2c0_default: i2c0_default {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
                    <NRF_PSEL(TWIM_SCL, 0, 12)>;
        };
    };

    i2c0_sleep: i2c0_sleep {
        group1 {
            psels = <NRF_PSEL(TWIM_SDA, 0, 11)>,
                    <NRF_PSEL(TWIM_SCL, 0, 12)>;
            low-power-enable;
        };
    };
};

&i2c0 {
	compatible = "nordic,nrf-twi";
	/* Cannot be used together with spi1. */
	status = "okay";
	pinctrl-0 = <&i2c0_default>;
	pinctrl-1 = <&i2c0_sleep>;
	pinctrl-names = "default", "sleep";
};

&systick {
    status = "disabled";
};

&spi1 {
    status = "disabled";
};

&uart1 {
    status = "okay";
    //compatible = "nordic,nrf-uarte";
    status = "okay";
    current-speed = <115200>;
    pinctrl-0 = <&uart1_default>;
    pinctrl-1 = <&uart1_sleep>;
    pinctrl-names = "default", "sleep";
};

&uart0 {
    status = "disabled";
};

And the initialization is:

const struct device* Board_uartDevice = DEVICE_DT_GET(DT_NODELABEL(uart1));

static void initUart (void)
{
    if (Board_uartDevice == NULL) 
    {
        return;
    }

    if (!device_is_ready(Board_uartDevice)) 
    {
        return;
    }
}

Where is it the problem?!

Thanks

Marco

Related