v2.7.0 SLM building failed to configure to UART2 for external MCU on nRF-9151

Hi all,

I'm trying to build an v2.7.0 SLM configured to using UART2 for external MCU on nRF-9151.

But the output image was acting weird...

The 2 virtual COM port of DK board was COM6 and COM7 on my PC, and UART2(PO.28 as input PO.29 as output) was COM1.

While POR of the 9151DK, I will receive the banner message on both COM6 and COM1, but the "Ready\r\n" only would pop up if COM6 was connected by terminal.

That is said if I only monitor COM1 or COM6, I could only receive banner message, SLM wouldn't work.

Only if I am connecting both COM1 and COM6, will the "Ready\r\n" pop up. Also only sending AT commands from COM1 will receive response. (Will response on both COM1 and COM6)

I've followed the page of SLM and modified nrf9151dk_nrf9151_ns.conf and nrf9151dk_nrf9151_ns.overlay. (Copy pasted below)

.conf was modified as suggested on SLM page, while .overlay was also modified as suggested but additionally modified the UART2 NRF_PSEL(TX -> 28, RX->29, RTS->16, CTS->17, according to hardware drawing on the back of DK board).

What am I missing?

--------.conf--------

#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Configuration file for nRF9151DK.
# This file is merged with prj.conf in the application folder, and options
# set here will take precedence if they are present in both files.

# Use UART_0 (when working with PC terminal)
# unmask the following config
#CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
#CONFIG_UART_0_NRF_HW_ASYNC=y
#CONFIG_SLM_POWER_PIN=8
#CONFIG_SLM_INDICATE_PIN=0

# Use UART_2 (when working with external MCU)
# unmask the following config
CONFIG_UART_2_NRF_HW_ASYNC_TIMER=2
CONFIG_UART_2_NRF_HW_ASYNC=y
CONFIG_SLM_POWER_PIN=31
CONFIG_SLM_INDICATE_PIN=30
---------------------------
--------.overlay--------(original file only have single line of #include<nrf9160dk_nrf9160_ns.overlay>)
/*
 * Copyright (c) 2024 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

/ {
    chosen {
        ncs,slm-uart = &uart2;
    };
};

&uart0 {
    status = "disabled";
    hw-flow-control;
};

&uart2 {
    compatible = "nordic,nrf-uarte";
    current-speed = <115200>;
    status = "okay";
    hw-flow-control;

    pinctrl-0 = <&uart2_default_alt>;
    pinctrl-1 = <&uart2_sleep_alt>;
    pinctrl-names = "default", "sleep";
};

&i2c2 {
    status = "disabled";
};

&pinctrl {
    uart2_default_alt: uart2_default_alt {
        group1 {
            psels = <NRF_PSEL(UART_RX, 0, 28)>;
            bias-pull-up;
        };
        group2 {
            psels = <NRF_PSEL(UART_TX, 0, 29)>,
                <NRF_PSEL(UART_RTS, 0, 16)>,
                <NRF_PSEL(UART_CTS, 0, 17)>;
        };
    };

    uart2_sleep_alt: uart2_sleep_alt {
        group1 {
            psels = <NRF_PSEL(UART_TX, 0, 29)>,
                <NRF_PSEL(UART_RX, 0, 28)>,
                <NRF_PSEL(UART_RTS, 0, 16)>,
                <NRF_PSEL(UART_CTS, 0, 17)>;
            low-power-enable;
        };
    };
};
----------------
Parents Reply Children
  • Hi Michal,

    Thanks for reply!

    I've only tried to modify the original overlay and conf file.

    However, I've just solve the problem.

    It turns out that the pins listed on the back of DK board was NOT the suggested pin to use if I want to use the interface. But the pins that are already accessed on DK board.

    And that is the reason why the POR banner message will pop on both COM6 and COM1 (cause I assigned the logical UART2 pins to the exactly same pins of already used pins on DK board).

    I just tried to configure back to PIN10 and PIN11 as original, and the result looks totally fine to me, no banner messages, SLM will react every time I POR. So... I guess the problem was solved :)

  • I see, glad to hear that you have managed to solve the problem :)

Related