How to trigger watchdog when kernel panic in i.MX6DL

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

How to trigger watchdog when kernel panic in i.MX6DL

1,826 Views
charleochiu
Contributor II

I just know that when using BLE connect other device , it will cause kernel panic in i.MX6DL target board. I want to use the watchdog to restart system. How can I enable it and use it?

kernel panic logs as bleow :
[ 144.378068] ------------[ cut here ]------------
[ 144.378099] WARNING: CPU: 1 PID: 1109 at /home/felicia/TG202A_V2/build_dl/tmp/work-shared/imx6dlsabresd/kernel-source/fs/sysfs/dir.c:31 sysfs_warn_dup+0x64/0x74
[ 144.378107] sysfs: cannot create duplicate filename '/devices/soc0/soc/2100000.aips-bus/21f0000.serial/tty/ttymxc3/hci0/hci0:65'
[ 144.378113] Modules linked in: mxc_dcic galcore(O)
[ 144.378141] CPU: 1 PID: 1109 Comm: kworker/u5:1 Tainted: G O 4.9.11-1.0.0+gc27010d99a3d #1
[ 144.378147] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 144.378161] Workqueue: hci0 hci_rx_work
[ 144.378201] [<8010eb64>] (unwind_backtrace) from [<8010b180>] (show_stack+0x10/0x14)
[ 144.378219] [<8010b180>] (show_stack) from [<803bf8b4>] (dump_stack+0x78/0x8c)
[ 144.378235] [<803bf8b4>] (dump_stack) from [<8012d390>] (__warn+0xe8/0x100)
[ 144.378248] [<8012d390>] (__warn) from [<8012d3e0>] (warn_slowpath_fmt+0x38/0x48)
[ 144.378261] [<8012d3e0>] (warn_slowpath_fmt) from [<80267e78>] (sysfs_warn_dup+0x64/0x74)
[ 144.378277] [<80267e78>] (sysfs_warn_dup) from [<80267f54>] (sysfs_create_dir_ns+0x84/0x94)
[ 144.378293] [<80267f54>] (sysfs_create_dir_ns) from [<803c20ec>] (kobject_add_internal+0x9c/0x2e4)
[ 144.378306] [<803c20ec>] (kobject_add_internal) from [<803c237c>] (kobject_add+0x48/0x98)
[ 144.378325] [<803c237c>] (kobject_add) from [<804c7d20>] (device_add+0xd4/0x580)
[ 144.378345] [<804c7d20>] (device_add) from [<8094d7fc>] (hci_conn_add_sysfs+0x2c/0x50)
[ 144.378364] [<8094d7fc>] (hci_conn_add_sysfs) from [<8093b0a4>] (hci_le_meta_evt+0xab0/0xd4c)
[ 144.378379] [<8093b0a4>] (hci_le_meta_evt) from [<8093ced8>] (hci_event_packet+0x78c/0x2c20)
[ 144.378391] [<8093ced8>] (hci_event_packet) from [<809300ac>] (hci_rx_work+0x174/0x274)
[ 144.378413] [<809300ac>] (hci_rx_work) from [<801432f0>] (process_one_work+0x1d8/0x3f0)
[ 144.378429] [<801432f0>] (process_one_work) from [<80143ec8>] (worker_thread+0x38/0x558)
[ 144.378445] [<80143ec8>] (worker_thread) from [<80148b68>] (kthread+0xdc/0xf4)
[ 144.378461] [<80148b68>] (kthread) from [<801076f8>] (ret_from_fork+0x14/0x3c)
[ 144.378469] ---[ end trace f337781249c2934c ]---
[ 144.378478] ------------[ cut here ]------------
[ 144.378492] WARNING: CPU: 1 PID: 1109 at /home/felicia/TG202A_V2/build_dl/tmp/work-shared/imx6dlsabresd/kernel-source/lib/kobject.c:240 kobject_add_internal+0x278/0x2e4
[ 144.378500] kobject_add_internal failed for hci0:65 with -EEXIST, don't try to register things with the same name in the same directory.
[ 144.378504] Modules linked in: mxc_dcic galcore(O)
[ 144.378527] CPU: 1 PID: 1109 Comm: kworker/u5:1 Tainted: G W O 4.9.11-1.0.0+gc27010d99a3d #1
[ 144.378533] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 144.378542] Workqueue: hci0 hci_rx_work
[ 144.378566] [<8010eb64>] (unwind_backtrace) from [<8010b180>] (show_stack+0x10/0x14)
[ 144.378581] [<8010b180>] (show_stack) from [<803bf8b4>] (dump_stack+0x78/0x8c)
[ 144.378593] [<803bf8b4>] (dump_stack) from [<8012d390>] (__warn+0xe8/0x100)
[ 144.378604] [<8012d390>] (__warn) from [<8012d3e0>] (warn_slowpath_fmt+0x38/0x48)
[ 144.378618] [<8012d3e0>] (warn_slowpath_fmt) from [<803c22c8>] (kobject_add_internal+0x278/0x2e4)
[ 144.378630] [<803c22c8>] (kobject_add_internal) from [<803c237c>] (kobject_add+0x48/0x98)
[ 144.378644] [<803c237c>] (kobject_add) from [<804c7d20>] (device_add+0xd4/0x580)
[ 144.378659] [<804c7d20>] (device_add) from [<8094d7fc>] (hci_conn_add_sysfs+0x2c/0x50)
[ 144.378673] [<8094d7fc>] (hci_conn_add_sysfs) from [<8093b0a4>] (hci_le_meta_evt+0xab0/0xd4c)
[ 144.378686] [<8093b0a4>] (hci_le_meta_evt) from [<8093ced8>] (hci_event_packet+0x78c/0x2c20)
[ 144.378698] [<8093ced8>] (hci_event_packet) from [<809300ac>] (hci_rx_work+0x174/0x274)
[ 144.378714] [<809300ac>] (hci_rx_work) from [<801432f0>] (process_one_work+0x1d8/0x3f0)
[ 144.378728] [<801432f0>] (process_one_work) from [<80143ec8>] (worker_thread+0x38/0x558)
[ 144.378742] [<80143ec8>] (worker_thread) from [<80148b68>] (kthread+0xdc/0xf4)
[ 144.378756] [<80148b68>] (kthread) from [<801076f8>] (ret_from_fork+0x14/0x3c)
[ 144.378764] ---[ end trace f337781249c2934d ]---
[ 144.378775] Bluetooth: Failed to register connection device

Labels (3)
0 Kudos
Reply
3 Replies

1,428 Views
charleochiu
Contributor II

Hi igor,

Thank you very much for your reply. Is there any official application document or guideline for MCIMX6Q-SDB and external watchdog that can be used to help shorten development time?

0 Kudos
Reply

1,428 Views
igorpadykov
NXP Employee
NXP Employee

Hi charleo

I am afraid such documentation is not available.

Best regards
igor

0 Kudos
Reply

1,428 Views
igorpadykov
NXP Employee
NXP Employee

Hi charleo

wdog linux usage is described in sect.2.9 Watchdog (WDOG) attached

Linux Manual, as schematic one can follow Sabre SD schematic

Schematics (1)
i.MX6_SABRE_SDP_DESIGNFILES
SABRE Platform for Smart Devices|NXP 

However more reliable way is to use external wdog chip resetting whole board,

as linux hanging may cause stop processor clocks, preventing internal wdog

from normal operation.


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