UARTs on nRF54L15 with custom PCB

I'm very new to Zephyr so please be patient with me.  I'm looking for an example that show me UARTs running on the following pins and setup.  I have the echo_bot working with an eval board but can't replicate on my custom PCB which uses different pins for the UARTs.  I've tried doing all different overlays to disable the nRF54L15-DK pins but I think they are still being used on accident.  

uart30 with no hardware flow control using P0.00 as TX and P0.01 as RX.

Then using the same uart30 with no hardware flow control using P0.02 as TX and P0.04 as RX.

Can someone show just a simple example?  I'm wondering if the console UART is messing up with my overlay setting.

In my overlay file I have this:

&uart30_default {
    group2 {
        psels = <NRF_PSEL(UART_RX, 0, 1)>;
    };

    group1 {
        psels = <NRF_PSEL(UART_TX, 0, 0)>;
    };
};

&lfxo {
    status = "disabled";
    load-capacitors = "internal";
    load-capacitance-femtofarad = <7000>;
    clock-frequency = <32768>;
};



&hfxo {
    status = "okay";
    clock-frequency = <32000000>;
    load-capacitors = "internal";
    load-capacitance-femtofarad = <17000>; // 17pF per BM15C datasheet
};


&clock {
    status = "okay";
};

//NFC pins need to be used as GPIOs
&uicr {
    nfct-pins-as-gpios;
};
&uart30 {
    status = "okay";
};
In my proj.conf:
CONFIG_SERIAL=y
CONFIG_I2C=y

CONFIG_CLOCK_CONTROL=n
#CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
#CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
#CONFIG_CLOCK_CONTROL_NRF_K32SRC_FREQUENCY=32768
# Disable synthesized LFCLK from HFCLK
CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=n


#CONFIG_DEBUG_OPTIMIZATIONS=y  #set for debugging so breakpoints work
In my main.c:
/* change this to any other UART peripheral if desired */
//#define UART_DEVICE_NODE DT_CHOSEN(zephyr_shell_uart)  //for nRF54L15-DK only which uses uart20 by default
#define UART_DEVICE_NODE DT_NODELABEL(uart30)  // for custom PCB for MCU update pins
//#define UART_DEVICE_NODE DT_NODELABEL(uart00)  // for custom PCB for jlink header pins
static const struct device *const uart_dev = DEVICE_DT_GET(UART_DEVICE_NODE);

#define MSG_SIZE 32

/* queue to store up to 10 messages (aligned to 4-byte boundary) */
K_MSGQ_DEFINE(uart_msgq, MSG_SIZE, 10, 4);



/* receive buffer used in UART ISR callback */
static char rx_buf[MSG_SIZE];
static int rx_buf_pos;

/*
 * Read characters from UART until line end is detected. Afterwards push the
 * data to the message queue.
 */
void serial_cb(const struct device *dev, void *user_data)
{
    uint8_t c;

    if (!uart_irq_update(uart_dev)) {
        return;
    }

    if (!uart_irq_rx_ready(uart_dev)) {
        return;
    }

    /* read until FIFO empty */
    while (uart_fifo_read(uart_dev, &c, 1) == 1) {
        if ((c == '\n' || c == '\r') && rx_buf_pos > 0) {
            /* terminate string */
            rx_buf[rx_buf_pos] = '\0';

            /* if queue is full, message is silently dropped */
            k_msgq_put(&uart_msgq, &rx_buf, K_NO_WAIT);

            /* reset the buffer (it was copied to the msgq) */
            rx_buf_pos = 0;
        } else if (rx_buf_pos < (sizeof(rx_buf) - 1)) {
            rx_buf[rx_buf_pos++] = c;
        }
        /* else: characters beyond buffer size are dropped */
    }
}
/*
 * Print a null-terminated string character by character to the UART interface
 */
void print_uart(char *buf)
{
    int msg_len = strlen(buf);

    for (int i = 0; i < msg_len; i++) {
        uart_poll_out(uart_dev, buf[i]);
    }
}
int main(void)
{
    char tx_buf[MSG_SIZE];
   
    if (!device_is_ready(uart_dev)) {
        //printk("UART device not found!");
        return 0;
    }

    // configure interrupt and callback to receive data
    int ret = uart_irq_callback_user_data_set(uart_dev, serial_cb, NULL);

    if (ret < 0) {
        if (ret == -ENOTSUP) {
            //printk("Interrupt-driven UART API support not enabled\n");
        } else if (ret == -ENOSYS) {
            //printk("UART device does not support interrupt-driven API\n");
        } else {
            //printk("Error setting UART callback: %d\n", ret);
        }
        return 0;
    }
    uart_irq_rx_enable(uart_dev);
    while(1)
    {
    print_uart("Hello! I'm your echo bot.\r\n");
    }
}
Related