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
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
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
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.
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
Thanks Simon, its working.
I think the Trace collector tool is hard coded to 1Meg baudrate so in the code i need to stick to the same to use the tool, attaching the trace logtrace-2020-07-08T08-05-10.965Z.bin which i have collected using the tool, since its not readable format and based on certain string in there i assume the trace file i collected in valid format.
regards
KK
I am not very familiar with modem traces and how the information in it is organized and if the trace you got out is valid.
By default, uart1 is used and the data goes directly into the Trace Collector app via USB VCOM2 port. The Trace collector app might parse the data in some way.
Should I look into this or close the case?