Hello,
I'm trying to develop a ble-uart gateway based on mesh provisioner and peripheral-uart samples but i'm getting an error on getting the device bind of the uart device.
I'm trying to use the UART_0 as debug using printk() and wanted to use 2 pins (32 and 33) as RX and TX with the name "UART_1". I went to the .dts file andi have this device
arduino_serial: &uart1 {
compatible = "nordic,nrf-uarte";
current-speed = <115200>;
tx-pin = <33>;
rx-pin = <32>;
rts-pin = <34>;
cts-pin = <35>;
label = "UART_1";
};
However i can't seem to be able to use this device, i've tried to use it by label, nodelabel and even creating an alias however i always get the NULL error in
static const struct device *uart_dev;
uart_dev = device_get_binding("UART_1");
if (uart_dev == NULL) {
printk("Cannot initialize UART 1 device\n");
return;
}
I've searched and tried various solutions found in the devzone forums but none resolved my issue, does anyone know what can i do?