Various watchdog device nodes on imx7up-evk

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

Various watchdog device nodes on imx7up-evk

719 Views
Raxesh-Oriya
Contributor III

I have imx7up-evk and in a process of validating watchdog functionality. I read from the document that there are three watchdog timers present(WDOG0-2); WDOG0 is in the real-time domain. WDOG1 and WDOG2 are in the application domain. I am running Yocto Linux in application domain with Linux version of 4.9.123-imx+g6a71cbc

I see there are three device nodes present under /dev directory:

crw------- 1 root root  10, 130 Aug 11 05:29 /dev/watchdog
crw------- 1 root root 248,   0 Aug 11 05:29 /dev/watchdog0
crw------- 1 root root 248,   1 Aug 11 05:29 /dev/watchdog1

Experimented with echo command:

echo > /dev/watchdog - triggered reset

echo > /dev/watchdog0 - triggered reset

echo > /dev/watchdog1 - Did NOT trigger reset

I just want to understand the significance of each and how can I validate them.

Labels (3)
0 Kudos
2 Replies

709 Views
igorpadykov
NXP Employee
NXP Employee

Hi Raxesh

 

according to Table 1. i.MX 7ULP modules list  i.MX7ULPCECB2: i.MX 7ULP Applications Processor—Consumer Products Data Sheet for Silicon Revision B2

there are : External Watchdog Monitor (EWM) module and WDOG0-2 modules. 

For wdog usage on M4 core one can download M4 SDK package from   https://mcuxpresso.nxp.com/en/welcome

and find wdog examples under boards\evkmcimx7ulp\driver_examples\wdog32.

For A7 core look at linux ..Documentation/watchdog/

 

Best regards
igor

0 Kudos

689 Views
Raxesh-Oriya
Contributor III

Hi @igorpadykov,

Thanks for the reply but my question still remains unanswered. Let me elaborate on, I am in process of validation watchdog functionality. 

Expected behavior:

Kernel panic triggered by echo c > /proc/sysrq-trigger command should cause system reboot by hardware watchdog. 

Actual behavior:

System hangs and becomes unresponsive but it doesn't reboot. Please find console logs below.

root@Node:~# echo c > /proc/sysrq-trigger
sysrq: SysRq : Trigger a crash
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = b155c000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT SMP ARM
Modules linked in: libcrc32c g_ether g_serial qca9377(O) galcore(O) evbug
CPU: 0 PID: 906 Comm: sh Tainted: G W O 4.9.123-imx+g6a71cbc #1
Hardware name: Freescale i.MX7ULP (Device Tree)
task: b0272100 task.stack: b105c000
PC is at sysrq_handle_crash+0x24/0x2c
LR is at sysrq_handle_crash+0x20/0x2c
pc : [<8047892c>] lr : [<80478928>] psr: 60000013
sp : b105deb0 ip : 00000000 fp : 00000000
r10: 00000004 r9 : 00000002 r8 : 80f309e4
r7 : 00000000 r6 : 00000007 r5 : 00000063 r4 : 00000001
r3 : 00000000 r2 : 00000000 r1 : 00000001 r0 : 00000063
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c53c7d Table: 9155c06a DAC: 00000051
Process sh (pid: 906, stack limit = 0xb105c210)
Stack: (0xb105deb0 to 0xb105e000)
dea0: 80f0fadc 80478dbc 00000002 00000000
dec0: 00000000 b0261280 00000000 00000002 00000004 8047932c 804792d8 8025a468
dee0: b06b26c0 8025a40c 016700f0 b105df80 00000000 80200a20 00000000 00000000
df00: 00000000 00000000 00000000 00000000 00000400 00000000 00000000 00000000
df20: 611392e7 3b02338c 611392e7 3b02338c 00000000 b0046998 b0046998 b105df80
df40: b06b26c0 00000002 016700f0 b105df80 00000000 80201860 00000004 00008080
df60: 00000001 b06b26c0 b06b26c0 00000000 00000000 016700f0 00000002 802025f4
df80: 00000000 00000000 611392e7 00000070 016700f0 76ea3be0 00000004 80107924
dfa0: b105c000 80107740 00000070 016700f0 00000001 016700f0 00000002 00000000
dfc0: 00000070 016700f0 76ea3be0 00000004 00000002 00000002 00000000 00000000
dfe0: 00000004 7eb99958 76e4398b 76dd0c46 60000030 00000001 00000000 00000000
[<8047892c>] (sysrq_handle_crash) from [<80478dbc>] (__handle_sysrq+0x80/0x164)
[<80478dbc>] (__handle_sysrq) from [<8047932c>] (write_sysrq_trigger+0x54/0x64)
[<8047932c>] (write_sysrq_trigger) from [<8025a468>] (proc_reg_write+0x5c/0x84)
[<8025a468>] (proc_reg_write) from [<80200a20>] (__vfs_write+0x1c/0x118)
[<80200a20>] (__vfs_write) from [<80201860>] (vfs_write+0xa4/0x168)
[<80201860>] (vfs_write) from [<802025f4>] (SyS_write+0x3c/0x90)
[<802025f4>] (SyS_write) from [<80107740>] (ret_fast_syscall+0x0/0x48)
Code: e5834000 f57ff04e ebf26f0b e3a03000 (e5c34000)

Message from syslogd@Node at Aug 11 09:05:44 ..---[ end trace f68728a0d3053b54 ]---
.
kernel:Internal error: Oops: 805 [#1] PREEMPT SMP ARM

Kernel panic - not syncing: Fatal exception
---[ end Kernel panic - not syncing: Fatal exception
Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:Process sh (pid: 906, stack limit = 0xb105c210)

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:Stack: (0xb105deb0 to 0xb105e000)

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dea0: 80f0fadc 80478dbc 00000002 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dec0: 00000000 b0261280 00000000 00000002 00000004 8047932c 804792d8 8025a468

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dee0: b06b26c0 8025a40c 016700f0 b105df80 00000000 80200a20 00000000 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:df00: 00000000 00000000 00000000 00000000 00000400 00000000 00000000 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:df20: 611392e7 3b02338c 611392e7 3b02338c 00000000 b0046998 b0046998 b105df80

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:df40: b06b26c0 00000002 016700f0 b105df80 00000000 80201860 00000004 00008080

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:df60: 00000001 b06b26c0 b06b26c0 00000000 00000000 016700f0 00000002 802025f4

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:df80: 00000000 00000000 611392e7 00000070 016700f0 76ea3be0 00000004 80107924

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dfa0: b105c000 80107740 00000070 016700f0 00000001 016700f0 00000002 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dfc0: 00000070 016700f0 76ea3be0 00000004 00000002 00000002 00000000 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:dfe0: 00000004 7eb99958 76e4398b 76dd0c46 60000030 00000001 00000000 00000000

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:Code: e5834000 f57ff04e ebf26f0b e3a03000 (e5c34000)

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:Kernel panic - not syncing: Fatal exception

Message from syslogd@Node at Aug 11 09:05:44 ...
kernel:---[ end Kernel panic - not syncing: Fatal exception

Any lead on this?

0 Kudos