Build Fail when trying to modify SLM application sample

Hello, 

I've been trying to modify the v2.4.0 Serial LTE Modem application sample for my nRF-9160 custom board, in order for it to communicate with our external MCU through UART2 at PO.28/29, while outputting modem trace log through another UART at PO.03/PO.04(From the reply of Nordic AI, I assume the default port of outputting LOG was uart1?).

I haven't change any original code files, but I've copied the "nrf9160dk_nrf9160_ns.conf", "nrf9160dk_nrf9160_ns.overlay" to modify, and also create an extra "open_uart_trace.conf" file.
I add these 3 files as extra Kconfig fragments and extra Devicetree overlays.

However when I build it, it would end up error, and from the build log it seems like there's a conflict about interrupt?

I can't figure out what did I need to do to fix the problem, please could someone help, thanks!

Below are the 3 files and the build Log.

custom_9160.conf

.

custom_9160.overlay
.
open_uart_trace.conf

.
====Build Log====

  • Hi,

    Are you trying to modify and build the sample for nrf9160dk_nrf9160_ns board target or for your custom board?

    I have reproduced your issue by building SLM sample for nrf9160dk_nrf9160_ns board target in NCS v2.4.0 with your config/overlay files. I will look further into it. I expect to get back to you by the end of next week.

    Best regards,
    Dejan

  • Hi Dejans,

    Yes I am trying to build a firmeare for my custom board. I'm aware that the pins might already assinged for other use on the DK board, but somehow our hardware engineer decide to place them there...

    We've been using that board as  modem for a while, so far it works fine.

    But recently at our new site, we are having a phenomenon thay even if the signal was good (power level is 8 from the response of AT%CONEVAL), the board would periodically response ERROR while we send XSEND command(TCP packet, with data mode).

    The data throughput of device there were about 100 bytes per packet, one packet per 10 second. And the Error would pop up roughly every 24 sends(sometimes less).

    Since error doesn't shows evertime we send XSEND, I assume the syntax was correct, so I am trying to make the 9160 output its LOG for more information about what's happening inside.

  • Hi,

    Can you provide complete application log and modem trace?

    Best regards,
    Dejan

  • Hi Dejans,

    Sorry we do not have the modem trace yet. The environment there doesn't have space for an J-Link and a laptop there. That's the reason I wanna build a slm application that could output trace through another UART while communicating with out external MCU.

    What we have now is the LOG of UART communication between external MCU and nRF-9160. It was separated into files because we logged them through 2 TF card UART logger.

    Also for some unknown reason, the LOG should be way more larger than this since its overnight logging, but this is what we got for now.

    9160 sending to M452(our Nuvoton external MCU):

    9160_to_M452_FILE0000.TXT9160_to_M452_FILE0001.TXT

    M452 sending to 9160

    M452_to_9160_FILE0003.TXT

    Also I am continuing trying to build the slm application, but I noticed that in the description under SLM sample's documnet folder, there's a file named slm_description.rst mentioned:
    """

    To save power, both the console and the output logs over ``UART_0`` are disabled in this application.

    """
    So it seems like the default uart port used to output trace is actually UART 0 instead of UART1?
    I've asked Nordic AI again and this time it also reply the default port is UART 0.
    If this is the case then here comes a new problem that in order to communicate with external MCU, the document says we have to enable UART 2 and disable UART0, but the default UART port used to output trace was UART 0.
    Is this solvable with configuration? Or this could only be solve by going into the codes to modify them?
  • Hi Dejans,

    Information update!

    According to the suggestion from Nordic AI to check the zephyr.dts, I kind of figure out that UART1 was likely to also be assigned to use by "arduino_serial". Guess that might be the reason IRQ error pops when I try to configure UART1.
    (Screenshot was taken "after" I changed the port, so uart1 is now disabled)

    However as I tried to configure the modem trace output port to UART3, it  could successfully build(new extra configure file attached below). But I ends up still receiving trace from one of the virtual port of the DK board instead of the expected PO.03/PO.04.
    custom_9160_A1_1.conf

    custom_9160_A1_1.overlay

    uart_trace.conf

1 2 3