memtool failed to read UART2345.URXD register

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

memtool failed to read UART2345.URXD register

481 Views
pisces
Contributor II

Hello, nxp expert,

I am using memtool to read UART register to find the root cause of one communication error.

however when i read UART4.URXD, the memtool prompt a Segmentation fault as follows:

root@fwg:/dev# memtool UART4.URXD
SOC: i.MX6SX
UART4 Addr:0x21f0000
[61884.534836] Unhandled fault: page domain fault (0x01b) at 0x00008bc0
[61884.543150] pgd = 82434000
[61884.545866] [00008bc0] *pgd=82442831, *pte=9cefe18f, *ppte=9cefea3e
[61884.552155] Internal error: : 1b [#16] PREEMPT ARM
[61884.556954] Modules linked in: g_ether imx_rpmsg_tty evbug
[61884.562466] CPU: 0 PID: 24868 Comm: memtool Tainted: G D 4.14.193+g3482f30e051f #1
[61884.571168] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[61884.577005] task: 822b6800 task.stack: 826f4000
[61884.581557] PC is at imx_pcie_abort_handler+0x4/0x74
[61884.586535] LR is at do_DataAbort+0x3c/0xb8
[61884.590724] pc : [<8044fff4>] lr : [<801012ec>] psr: 600f0193
[61884.596994] sp : 826f5f10 ip : 80d080bc fp : 00064cf0
[61884.602223] r10: 00000000 r9 : 002d6ed4 r8 : 826f5fb0
[61884.607452] r7 : 8044fff0 r6 : 76f9c000 r5 : 00001018 r4 : 80d0813c
[61884.613982] r3 : 00008bc0 r2 : 826f5fb0 r1 : 00001018 r0 : 76f9c000
[61884.620515] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[61884.627741] Control: 10c53c7d Table: 82434059 DAC: 00000051
[61884.633491] Process memtool (pid: 24868, stack limit = 0x826f4208)
[61884.639677] Stack: (0x826f5f10 to 0x826f6000)
[61884.644043] 5f00: 00000000 00001000 00000001 82d261f8
[61884.652227] 5f20: 826f5f48 801d1d88 00000001 00000000 000021f0 826f5f44 826f5f48 00000000
[61884.660412] 5f40: 83cb8000 00000000 826f5f48 826f5f48 83fd0400 00000000 83fd0608 83fd0608
[61884.668599] 5f60: 822b6800 826f4000 000000c0 8019a724 826f4000 826f5fb0 ffffe000 001de644
[61884.676784] 5f80: 000000c0 80107884 826f4000 000000c0 00064cf0 80109674 00008bc0 600f0010
[61884.684971] 5fa0: ffffffff 10c53c7d 10c53c7d 8010bc9c 00000000 00001000 00000003 76f9c000
[61884.693152] 5fc0: 00000000 00000004 001de644 7ea5c9ad 001e9534 002d6ed4 00000000 00064cf0
[61884.701337] 5fe0: 000000c0 7ea5c340 4b688d37 00008bc0 600f0010 ffffffff 00000000 00000000
[61884.709538] [<8044fff4>] (imx_pcie_abort_handler) from [<801012ec>] (do_DataAbort+0x3c/0xb8)
[61884.717992] [<801012ec>] (do_DataAbort) from [<8010bc9c>] (__dabt_usr+0x3c/0x40)
[61884.725394] Exception stack(0x826f5fb0 to 0x826f5ff8)
[61884.730452] 5fa0: 00000000 00001000 00000003 76f9c000
[61884.738637] 5fc0: 00000000 00000004 001de644 7ea5c9ad 001e9534 002d6ed4 00000000 00064cf0
[61884.746820] 5fe0: 000000c0 7ea5c340 4b688d37 00008bc0 600f0010 ffffffff
[61884.753446] Code: e58d3000 ebfff99e eaffffab e592303c (e5933000)
[61884.759549] ---[ end trace 69c1e2c0c56e6e7c ]---
Segmentation fault

 

However if i read UART1.URXD, it work well:

root@fwg:/dev# memtool UART1.URXD
SOC: i.MX6SX
UART1 Addr:0x2020000
UART1.URXD Addr:0x02020000 Value:0x0000001B - The UART will yield a transfer error on the peripheral bus when core is reading URXD register with receive interface disabled (RXEN=0 or UARTEN=0).
UART1.URXD.RX_DATA(0..7) :0x1b
Received Data.
UART1.URXD.PRERR(10..10) :0x0
In RS-485 mode, it holds the ninth data bit (bit [8]) of received 9-bit RS-485 data In RS232/IrDA mode, it is the Parity Error flag.
UART1.URXD.BRK(11..11) :0x0
BREAK Detect.
UART1.URXD.FRMERR(12..12) :0x0
Frame Error.
UART1.URXD.OVRRUN(13..13) :0x0
Receiver Overrun.
UART1.URXD.ERR(14..14) :0x0
Error Detect.
UART1.URXD.CHARRDY(15..15) :0x0
Character Ready.

I have enalbed all the clocks actually.  and the following is my uart dts configuration:

&uart4 { 
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
dma-names = "", "";
rts-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
uart-has-rtscts;
status = "okay";

 

does anyone hav ever encounter this issue ?

 

thanks.

0 Kudos
1 Reply

476 Views
igorpadykov
NXP Employee
NXP Employee

Hi weigang_fan

 

one can attach jtag debugger and try to access that register with jtag.

Also recommended to try latest bsp:

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_5.4.47_2.2.0

https://source.codeaurora.org/external/imx/imx-test/tree/test/memtool?h=imx_5.4.47_2.2.0

 

Best regards
igor

0 Kudos