imx8mq spi to uart encountered crash by ch432t chip

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

imx8mq spi to uart encountered crash by ch432t chip

471 Views
chenfeng2016
Contributor I

Hello,

  I use SPI to UART port on imx8mq by ch432t chip, but there is a crash phenomenon when writing to the serial port by echo 1 > /dev/ttyWCH0.  there is something wrong with SPI driver. Please help to analyze the cause.

linux yocto:4.14.98

crash log as belows: imx8mq-linux-ch432t-crash.txt  log attaced

 

root@imx8mqevk:~# echo 1 > /dev/ttyWCH0
[ 217.678802] BUG: scheduling while atomic: sh/3681/0x00000002
[ 217.684500] Modules linked in:
[ 217.687753] CPU: 0 PID: 3681 Comm: sh Not tainted 4.14.98-imx_4.14.98_2.0.0_ga+g2fa0f7c7b119 #1
[ 217.696451] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 217.701502] Call trace:
[ 217.703959] [<ffff000008089c48>] dump_backtrace+0x0/0x3c8
[ 217.709361] [<ffff00000808a024>] show_stack+0x14/0x20
[ 217.714417] [<ffff000008db2840>] dump_stack+0x9c/0xbc
[ 217.719473] [<ffff0000080f3c44>] __schedule_bug+0x4c/0x70
[ 217.724875] [<ffff000008dc6db8>] __schedule+0x558/0x5e8
[ 217.730100] [<ffff000008dc6e80>] schedule+0x38/0xa0
[ 217.734982] [<ffff000008dca2cc>] schedule_timeout+0x74/0x320
[ 217.740643] [<ffff000008dc7b08>] wait_for_common+0x98/0x140
[ 217.746217] [<ffff000008dc7be0>] wait_for_completion_timeout+0x10/0x18
[ 217.752749] [<ffff0000087b1648>] spi_imx_transfer+0xb8/0x438
[ 217.758410] [<ffff0000087aef20>] spi_bitbang_transfer_one+0x58/0xd0
[ 217.764679] [<ffff0000087a9288>] spi_transfer_one_message+0xf0/0x3c8
[ 217.771034] [<ffff0000087a9b2c>] __spi_pump_messages+0x324/0x578
[ 217.777041] [<ffff0000087a9f74>] __spi_sync+0x1d4/0x200
[ 217.782267] [<ffff0000087a9fcc>] spi_sync+0x2c/0x50
[ 217.787147] [<ffff0000087aa0ec>] spi_write_then_read+0xfc/0x1d0
[ 217.793068] [<ffff0000087bbc48>] ch43x_port_read.isra.3+0x50/0xa0
[ 217.799163] [<ffff0000087bbcd0>] ch43x_port_update+0x38/0x70
[ 217.804823] [<ffff0000087bc030>] ch43x_start_tx+0x70/0x98
[ 217.810226] [<ffff000008614840>] __uart_start.isra.1+0x38/0x48
[ 217.816061] [<ffff000008614b84>] uart_write+0x1d4/0x2b0
[ 217.821289] [<ffff0000085f6820>] n_tty_write+0x178/0x400
[ 217.826603] [<ffff0000085f2254>] tty_write+0x14c/0x2e8
[ 217.831745] [<ffff000008215388>] __vfs_write+0x18/0x118
[ 217.836972] [<ffff00000821567c>] vfs_write+0xa4/0x1b0
[ 217.842026] [<ffff000008215940>] SyS_write+0x48/0xb0
[ 217.846991] Exception stack(0xffff000010c5bec0 to 0xffff000010c5c000)
[ 217.853434] bec0: 0000000000000001 000000001ac707c0 0000000000000002 0000ffff8e3f9190
[ 217.861265] bee0: 0000000000000000 5551000454000000 0000000000000001 0000000000000006
[ 217.869096] bf00: 0000000000000040 0000ffff8e462700 0000000000000040 0000000000000000
[ 217.876927] bf20: 0000000000000001 000000000000270f 0000000000000002 0000000000000000
[ 217.884758] bf40: 00000000004e93b8 0000ffff8e310270 0000ffff8e3f4a70 0000000000000001
[ 217.892589] bf60: 000000001ac707c0 0000ffff8e3f5560 0000000000000002 000000001ac707c0
[ 217.900420] bf80: 0000000000000002 00000000004d21d8 0000000000000001 0000000000000000
[ 217.908251] bfa0: 000000001ac70600 0000ffffc3045740 0000ffff8e3134dc 0000ffffc3045740
[ 217.916082] bfc0: 0000ffff8e366d4c 0000000020000000 0000000000000001 0000000000000040
[ 217.923913] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 217.931745] [<ffff000008083b18>] __sys_trace_return+0x0/0x4
[ 217.937758] BUG: scheduling while atomic: sh/3681/0x00000000
[ 217.943415] Modules linked in:
[ 217.946471] CPU: 0 PID: 3681 Comm: sh Tainted: G W 4.14.98-imx_4.14.98_2.0.0_ga+g2fa0f7c7b119 #1
[ 217.956381] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 217.961429] Call trace:
[ 217.963878] [<ffff000008089c48>] dump_backtrace+0x0/0x3c8
[ 217.969276] [<ffff00000808a024>] show_stack+0x14/0x20
[ 217.974328] [<ffff000008db2840>] dump_stack+0x9c/0xbc
[ 217.979380] [<ffff0000080f3c44>] __schedule_bug+0x4c/0x70
[ 217.984777] [<ffff000008dc6db8>] __schedule+0x558/0x5e8
[ 217.990001] [<ffff000008dc6e80>] schedule+0x38/0xa0
[ 217.994878] [<ffff0000080898e4>] do_notify_resume+0xd4/0x108
[ 218.000535] Exception stack(0xffff000010c5bec0 to 0xffff000010c5c000)
[ 218.006975] bec0: 0000000000000002 000000001ac707c0 0000000000000002 0000ffff8e3f9190
[ 218.014803] bee0: 0000000000000000 5551000454000000 0000000000000001 0000000000000006
[ 218.022631] bf00: 0000000000000040 0000ffff8e462700 0000000000000040 0000000000000000
[ 218.030459] bf20: 0000000000000001 000000000000270f 0000000000000002 0000000000000000
[ 218.038288] bf40: 00000000004e93b8 0000ffff8e310270 0000ffff8e3f4a70 0000000000000001
[ 218.046116] bf60: 000000001ac707c0 0000ffff8e3f5560 0000000000000002 000000001ac707c0
[ 218.053944] bf80: 0000000000000002 00000000004d21d8 0000000000000001 0000000000000000
[ 218.061773] bfa0: 000000001ac70600 0000ffffc3045740 0000ffff8e3134dc 0000ffffc3045740
[ 218.069601] bfc0: 0000ffff8e366d4c 0000000020000000 0000000000000001 0000000000000040
[ 218.077429] bfe0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[ 218.085257] [<ffff000008083964>] work_pending+0x8/0x10

 

Thank you;

Labels (1)
0 Kudos
0 Replies