Crash occrus at time of UART full duplex mode

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

Crash occrus at time of UART full duplex mode

921 Views
khushbu_patel
Contributor I

Hi,

We have designed our custom board with imx8mq processor. We have 2 UART in our board and while connecting them in loop back for full duplex mode with hardware flow control based on RS232 protocol, we are getting a crash on board.

Do you have any idea about why this crash is coming?

I think this comes from driver but I am not sure about this.

We are using simple below script in for loop to test the UART in full duplex mode. And transmit data from both the UART. In starting data has been transferred both the side so it looks like hardware connections are good. But after sometime, below crash has been observed everytime.

To transmit:

                                stty -F /dev/ttymxc1 921600 clocal cread cs8 -cstopb -parenb \
                                -echo -onlcr crtscts
                                echo
                                echo -n "Enter string to send : "
                                read rs232_send_buf
                                echo "$rs232_send_buf" > /dev/ttymxc1

To receive:

                                stty -F /dev/ttymxc1 921600 clocal cread cs8 -cstopb -parenb \
                                -echo -onlcr crtscts
                                echo
                                read -r line < /dev/ttymxc1
                                echo -n "Recived string : " $line
                                echo

Crash:

[ 1194.469337] Unable to handle kernel NULL pointer dereference at virtual address 00000178
[ 1194.470649] Mem abort info:
[ 1194.471107]   Exception class = DABT (current EL), IL = 32 bits
[ 1194.472111]   SET = 0, FnV = 0
[ 1194.472555]   EA = 0, S1PTW = 0
[ 1194.474205] Data abort info:
[ 1194.474723]   ISV = 0, ISS = 0x00000006
[ 1194.475213]   CM = 0, WnR = 0
[ 1194.475598] user pgtable: 4k pages, 48-bit VAs, pgd = ffff8000f9beb000
[ 1194.476455] [0000000000000178] *pgd=0000000000000000
[ 1194.477252] Internal error: Oops: 96000006 [#1] PREEMPT SMP stty -F /dev/ttymxc1 921600 clocal cread cs8 -cstopb -parenb \
-echo -onlcr crtscts
echo
read -r line < /dev/ttymxc1
echo -n "Recived string : " $line
echo

[ 1194.477959] Modules linked in: 8021q garp stp mrp crc32_ce crct10dif_ce galcore(O)
[ 1194.478945] CPU: 0 PID: 4997 Comm: kworker/u8:0 Tainted: G           O    4.14.78-master_imx_4.14.78+g35fa0ab #1
[ 1194.480229] Hardware name: Winsystem i.MX8MQ PICOITX (DT)
[ 1194.480926] Workqueue: events_unbound flush_to_ldisc
[ 1194.481560] task: ffff8000f8fac380 task.stack: ffff000021a70000
[ 1194.482316] PC is at uart_start+0x14/0x148
[ 1194.482841] LR is at uart_flush_chars+0xc/0x18
[ 1194.483408] pc : [<ffff00000861238c>] lr : [<ffff0000086124cc>] pstate: 40000145
[ 1194.484341] sp : ffff000021a73c60
[ 1194.484765] x29: ffff000021a73c60 x28: ffff8000f9957c00
[ 1194.485446] x27: 000000000000000c x26: 0000000000000000
[ 1194.486123] x25: 0000000000000000 x24: ffff8000f9793089
[ 1194.486802] x23: 0000000000000000 x22: 000000000000000c
[ 1194.487482] x21: ffff0000224f8000 x20: 000000000000000c
[ 1194.488161] x19: ffff8000f9957c00 x18: 0000ffffbb7aba70
[ 1194.488840] x17: 0000ffffbb71d808 x16: ffff000008212bc8
[ 1194.489519] x15: ffff8000f9793089 x14: 071c71c71c71c71c
[ 1194.490198] x13: 00000000ffffffff x12: 0000000000000031
[ 1194.490877] x11: 0000000000000001 x10: 0000000000000000
[ 1194.491556] x9 : ffff000021a73d80 x8 : ffff8000f8facd60
[ 1194.492235] x7 : 00000000ffffffff x6 : ffff8000f9957e10
[ 1194.492914] x5 : ffff000021a73c38 x4 : 0000000000000001
[ 1194.493593] x3 : 0000000000000000 x2 : 0000000000000002
[ 1194.494272] x1 : ffff0000086124c0 x0 : 0000000000000000
[ 1194.494953] Process kworker/u8:0 (pid: 4997, stack limit = 0xffff000021a70000)
[ 1194.495866] Call trace:
[ 1194.496185] Exception stack(0xffff000021a73b20 to 0xffff000021a73c60)
[ 1194.497002] 3b20: 0000000000000000 ffff0000086124c0 0000000000000002 0000000000000000
[ 1194.497993] 3b40: 0000000000000001 ffff000021a73c38 ffff8000f9957e10 00000000ffffffff
[ 1194.498987] 3b60: ffff8000f8facd60 ffff000021a73d80 0000000000000000 0000000000000001
[ 1194.499977] 3b80: 0000000000000031 00000000ffffffff 071c71c71c71c71c ffff8000f9793089
[ 1194.500972] 3ba0: ffff000008212bc8 0000ffffbb71d808 0000ffffbb7aba70 ffff8000f9957c00
[ 1194.501962] 3bc0: 000000000000000c ffff0000224f8000 000000000000000c 0000000000000000
[ 1194.502954] 3be0: ffff8000f9793089 0000000000000000 0000000000000000 000000000000000c
[ 1194.503945] 3c00: ffff8000f9957c00 ffff000021a73c60 ffff0000086124cc ffff000021a73c60
[ 1194.504937] 3c20: ffff00000861238c 0000000040000145 0000000000000000 0000000000000000
[ 1194.505928] 3c40: ffffffffffffffff 0000000000000000 ffff000021a73c60 ffff00000861238c
[ 1194.506922] [<ffff00000861238c>] uart_start+0x14/0x148
[ 1194.507576] [<ffff0000086124cc>] uart_flush_chars+0xc/0x18
[ 1194.508278] [<ffff0000085f58e4>] n_tty_receive_buf_common+0x3b4/0xa18
[ 1194.509097] [<ffff0000085f5f58>] n_tty_receive_buf2+0x10/0x18
[ 1194.509829] [<ffff0000085f8dfc>] tty_ldisc_receive_buf+0x1c/0x58
[ 1194.510595] [<ffff0000085f997c>] tty_port_default_receive_buf+0x44/0x88
[ 1194.511437] [<ffff0000085f8fe4>] flush_to_ldisc+0x9c/0xc0
[ 1194.512128] [<ffff0000080e7c94>] process_one_work+0x1d4/0x348
[ 1194.512860] [<ffff0000080e7e50>] worker_thread+0x48/0x470
[ 1194.513550] [<ffff0000080ee154>] kthread+0x12c/0x130
[ 1194.514186] [<ffff000008084ed8>] ret_from_fork+0x10/0x18
[ 1194.514867] Code: 910003fd f9000bf3 aa0003f3 f9413000 (b9417804)
[ 1194.515645] ---[ end trace 1a7634ab9bb18859 ]---

Thank you so much in advance for your help!!

Regards,

Khushbu Patel

Tags (1)
0 Kudos
4 Replies

781 Views
igorpadykov
NXP Employee
NXP Employee

Hi Khushbu

error like "Unable to handle kernel NULL pointer dereference..Mem abort info"

may point to memory issues and one can test memory with

https://community.nxp.com/docs/DOC-340179 

Also may be recommended to rebuild all image from scratch.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

781 Views
khushbu_patel
Contributor I

Hi igor,

Thanks for quick response.
Just wanted to update you that we are using LPDDR4 RAM, with imx8mq processor.
And imx processor contains 64-byte transmitter FIFO and a 32-half-word deep receiver FIFO as per the imx reference manual.

With this information do you find any possibility of getting crash? I think with this configurations of RAM and processor quality, memory issue should not occur.

Please share your idea.

0 Kudos

781 Views
igorpadykov
NXP Employee
NXP Employee

Hi Khushbu

 

regarding "And imx processor contains 64-byte transmitter FIFO and a 32-half-word

deep receiver FIFO as per the imx" as possible cause of issue, one can test it

on i.MX8MQ EVK with Demo Images from

i.MX Software and Development Tools | NXP 

 

Best regards
igor

0 Kudos

781 Views
khushbu_patel
Contributor I

Thanks for the reply, Igor.

I want to update you that we tried to test UART in full duplex mode with C application instead of shell commands of reading and writing to UART ports directly which I mentioned earlier. Due to proper library call to UART port, no crash has been observed while testing. So this could be due improper flow control of messages directly from shell commands.

Thanks again for your help!

Thanks & Regards,

Khushbu Patel

0 Kudos