This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hardware requirements for collecting modem traces.

Hi,

As we are in design phase of our custom board based on nRF9160, can you please let us know what all pins needs to be exposed in our design for collecting modem traces?

regards

KK

Parents
  • Are you seeing any output at all on the TX and RX pins you've assigned to uart2? Please make sure that uart2 isn't defined multiple places in your project, as that might cause some conflicts.

    Can you check that the NRFX_UARTE2_ENABLED and NRFX_UARTE_ENABLED defines are set to 1 in your project? Do you get any error codes or does the device run as expected?

    Best regards,

    Simon

  • Are you seeing any output at all on the TX and RX pins you've assigned to uart2? Please make sure that uart2 isn't defined multiple places in your project, as that might cause some conflicts.

    I dont see any any data from the configured UART2 pins

    Can you check that the NRFX_UARTE2_ENABLED and NRFX_UARTE_ENABLED defines are set to 1 in your project? Do you get any error codes or does the device run as expected?

    I cant see the above mentioned macros in the autoconf.h but i do see CONFIG_NRFX_UARTE2 1, I think that should be ok

    Anyway i am attaching the relevant files.serial_lte_modem.zip

  • I took a quick look at this and I think I figured out how to go about this.

    I think the library bsd_os.c needs to be modified.

    • First, make sure UART2 is enabled in Kconfig and the device tree (It should be enabled by default in ncs\v1.3.0\zephyr\boards\arm\nrf9160dk_nrf9160\nrf9160dk_nrf9160_common.dts)
    • Then change this line to NRFX_UARTE_INSTANCE(2);
    • Then do some modifications to the function trace_uart_init():

    void trace_uart_init(void)
    {
    #ifdef CONFIG_BSD_LIBRARY_TRACE_ENABLED
    	/* UART pins are defined in "nrf9160dk_nrf9160.dts". */
    	const nrfx_uarte_config_t config = {
    		/* Use UARTE1 pins routed on VCOM2. */
    		//.pseltxd = DT_PROP(DT_NODELABEL(uart1), tx_pin),
    		//.pselrxd = DT_PROP(DT_NODELABEL(uart1), rx_pin),
    		.pseltxd = DT_PROP(DT_NODELABEL(uart2), tx_pin),
    		.pselrxd = DT_PROP(DT_NODELABEL(uart2), rx_pin),
    		.pselcts = NRF_UARTE_PSEL_DISCONNECTED,
    		.
    		.
    		.
    #endif
    }

    If you've not changed the UART pins in an overlay file it will output it on the TX pin defined in ncs\v1.3.0\zephyr\boards\arm\nrf9160dk_nrf9160\nrf9160dk_nrf9160_common.dts

    I have not tested this myself, but I think this is the way to go about it. Report back to me if it's working or not.

    Bes regards,

    Simon

  • One question: Do you want to forward the UART data to the USB port, such that it can get collected using the Trace Collector app, or are you collecting the data directly from the UART in some way?

  • I wanted to collect the trace data over the UART using the trace collector tool, similar to this post

    https://devzone.nordicsemi.com/f/nordic-q-a/58041/nrf9160-modem-trace-not-working

    Based on the code I even tried switching to different UART and baudrate, but still I don’t see any trace data on the serial lines.

    regards

    KK

Reply Children
No Data
Related