UART unable to confiogure

Please refer screen shot attach
I am able to configure uart0 but not able to configure uart1,2,3

i am receiving multiple errors while same code is working fine for uart0.

I am using zephyre OS , 

i am using latest nrf Connect SDK 2.7.0

H/W nrf52840dk/nrf52840.




refer sample code


#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/sys/printk.h>

#define SLEEP_TIME_MS 1000

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

static uint8_t tx_buf[] =   {"SLS TEST Validation ==nRF Connect SDK Fundamentals Course\r\n"
                             "1 TO 100 kit\r\n"};

//static void uart_cb(const struct device *dev, struct uart_event *evt, void *user_data);

int main(void) {
    int ret;
if(!device_is_ready(uart)){
    printk("UART Device not Ready\r\n");
    return 1 ;
    }
 while (1) {

       
ret = uart_tx(uart, tx_buf, sizeof(tx_buf), SYS_FOREVER_US);
    if(ret){
        return 1;
    }
k_msleep(SLEEP_TIME_MS);
    }
    return 0;
}
Parents Reply Children
Related