6175.trace-2025-05-13T14-12-36.978Z.mtrace
Hi,
I have a custom board build with an nrf9151. Right now I'd like to have the possibilty ti get modem trace. But it's look like I got crypted/corrupted data from UART1. So in my project I created an overlay file like this:
/ {
chosen {
nordic,modem-trace-uart = &uart1;
};
};
&i2c1 {
status = "disabled";
};
&uart1 {
current-speed = <1000000>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
Here is my board comon-pinctrl
&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 5)>;
};
};
uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 5)>;
low-power-enable;
};
};
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 23)>,
<NRF_PSEL(UART_RX, 0, 24)>;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 23)>,
<NRF_PSEL(UART_RX, 0, 24)>;
low-power-enable;
};
};
i2c1_default: i2c1_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
};
};
i2c1_sleep: i2c1_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
low-power-enable;
};
};
}
in my common file
...
&adc {
status = "okay";
};
&gpiote {
status = "okay";
};
&gpio0 {
status = "okay";
};
&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};
&i2c1 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c1_default>;
pinctrl-1 = <&i2c1_sleep>;
pinctrl-names = "default", "sleep";
};
...
So I think my board def and overlay are good...
In my prj.conf
... CONFIG_GPIO=y CONFIG_I2C=y CONFIG_LOG=y CONFIG_DEBUG=y CONFIG_ASSERT=y CONFIG_NRF_MODEM_LOG=y CONFIG_SERIAL=y CONFIG_AT_HOST_LIBRARY=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_NRF_MODEM_LIB_TRACE=y ....
Ok so with all this configuration I'm able to send AT command via serial (UART0) example if I send `AT+CGMR` I got mfw_nrf91x1_2.0.2. and when my custom board boot I have serial terminal showing this:
*** Booting nRF Connect SDK v3.5.99-ncs1-1 *** [00:00:00.308,868] <inf> LOG: Sample started. [00:00:00.308,990] <inf> nrf_modem: Initializing libmodem 2.6.1-lte-11b6ed4846a8 [00:00:00.556,304] <inf> nrf_modem: RPC ready [00:00:00.556,671] <inf> nrf_modem_lib_trace: Trace thread ready [00:00:00.558,258] <inf> nrf_modem_lib_trace: Trace level override: 2 [00:00:00.689,941] <inf> LOG: Waiting for LTE connect event.
So I presume UART0 works well and my firmware also. Right now I want to get modem trace so I plugged an CP2102 to my UART1, when my board boot I can see Rx led on my cp2102 blinking rapidly, so I presume lot of data coming to this UART1.
I open Cellular monitor and I select my cp2102 plug on UART1 and I let modem trace database in autoselect, in this configuration, cellular monitor never checked in green number 1 TRACE step. So after I try to specify my databse (v2.02 like AT+CGMR return mfw_nrf91x1_2.0.2) and now I have a mtrace file but all data inside look corrupted or crypted (I've attached an example with my post). I managed lot of test, always same prblem, even if I try to reset my board during cellular monitor detect phase.
Any thoughts?

