Hi,
For a project we want to use the watchdog to reboot our board if an application hangs.
To start, I wanted to validate the watchdog works and is setup using the SDK but it seems it does not reset the board.
My steps:
Flash an uSD card with the PROCESSOR-SDK-LINUX-J721E SDK, Version: 08.06.01.02. I used the tisdk-edgeai-image-j7-evm.tar.xz file
Boot the board.
Start the watchdog test with the command:
./runltp -P j721e-evm -f ddt/wdt_test -s "WDT_M_FUNC_WRI"
The output I got is:
root@tda4vm-sk:/opt/ltp# ./runltp -P j721e-evm -f ddt/wdt_test -s "WDT_M_FUNC_WRI"
INFO: creating /opt/ltp/results directory
INFO: Filtering testscenarios based on j721e-evm capabilities
awk: cmd. line:1: warning: regexp escape sequence `\&' is not a known regexp operator
Checking for required user/group ids
'nobody' user id and group found.
'bin' user id and group found.
'daemon' user id and group found.
Users group found.
Sys group found.
Required users/groups exist.
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
/etc/os-release
ID=arago
NAME="Arago"
VERSION="2021.09"
VERSION_ID=2021.09
PRETTY_NAME="Arago 2021.09"
uname:
Linux tda4vm-sk 5.10.162-g76b3e88d56 #1 SMP PREEMPT Tue May 30 11:26:02 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
/proc/cmdline
console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs) root=PARTUUID=38e6d492-02 rw rootfstype=ext4 rootwait
Gnu C gcc (GCC) 9.2.1 20191025
Clang
Gnu make 4.3
util-linux 2.35.1
mount linux 2.35.1 (libmount 2.35.1: btrfs, namespaces, assert, debug)
modutils 26
e2fsprogs 1.45.7
Linux C Library > libc.2.30
Dynamic linker (ldd) 2.30
Linux C++ Library 6..
Procps 3.3.16
Net-tools 1.60
iproute2 iproute2-5.10.0
iputils 'V'
ethtool 5.10
Kbd 2.2.0
Sh-utils 8.31
Modules Loaded bluetooth ecdh_generic ecc rfkill xhci_plat_hcd xhci_hcd omap_rng cdns_csi2rx v4l2_fwnode cdns3 udc_core roles irq_pruss_intc rpmsg_char pru_rproc icss_iep usbcore usb_common crct10dif_ce phy_can_transceiver ti_k3_r5_remoteproc cdns_mhdp8546 pruss pvrsrvkm sa2ul m_can_platform vxe_enc ti_k3_dsp_remoteproc m_can vxd_dec sha512_generic j721e_csi2rx virtio_rpmsg[ 105.352092] LTP: starting WDT_M_FUNC_WRITE (source 'common.sh'; do_cmd install_modules.sh 'wdt' ; DEV_NODE=`get_devnode.sh "wdt"` || die "error getting devnode for wdt"; do_cmd wdt_tests -device $DEV_NODE -ioctl -write)
_bus videobuf2_dma_sg authenc cdns_dphy pci_endpoint_test v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common cdns3_ti can_dev rti_wdt optee_rng rng_core sch_fq_codel rpmsg_kdrv_switch cryptodev ipv6
free reports:
total used free shared buff/cache available
Mem: 2222532 96052 1913620 9508 212860 1975840
Swap: 0 0 0
cpuinfo:
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Vendor ID: ARM
Model: 0
Model name: Cortex-A72
Stepping: r1p0
BogoMIPS: 400.00
L1d cache: 64 KiB
L1i cache: 96 KiB
L2 cache: 1 MiB
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1: Mitigation; __user pointer sanitization
Vulnerability Spectre v2: Vulnerable: Unprivileged eBPF enabled
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
AppArmor disabled
SELinux mode: unknown
no big block device was specified on commandline.
Tests which require a big block device are disabled.
You can specify it with option -z
COMMAND: /opt/ltp/bin/ltp-pan -e -S -a 1384 -n 1384 -p -f /tmp/ltp-NDN2TunRI5/alltests -l /tmp/tmp.dFHdYQevKx -C /opt/ltp/output/LTP_RUN_ON-tmp.dFHdYQevKx.failed -T /opt/ltp/output/LTP_RUN_ON-tmp.dFHdYQevKx.tconf
INFO: Restricted to WDT_M_FUNC_WRI
LOG File: /tmp/tmp.dFHdYQevKx
FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-tmp.dFHdYQevKx.failed
TCONF COMMAND File: /opt/ltp/output/LTP_RUN_ON-tmp.dFHdYQevKx.tconf
Running tests.......
<<<test_start>>>
tag=WDT_M_FUNC_WRITE stime=1685446653
cmdline="source 'common.sh'; do_cmd install_modules.sh 'wdt' ; DEV_NODE=`get_devnode.sh "wdt"` || die "error getting devnode for wdt"; do_cmd wdt_tests -device $DEV_NODE -ioctl -write"
contacts=""
analysis=exit
<<<test_output>>>
|TRACE LOG|Inside do_cmd:CMD=install_modules.sh wdt|
|TRACE LOG|Inside do_cmd:CMD=wdt_tests -device /dev/watchdog -ioctl -write|
|TEST START|wdt_tests|
|TRACE LOG|******** WDT Testcase parameters ******** |
|TRACE LOG|Device : /dev/watchdog|
|TRACE LOG|Loop Count : 1|
|TRACE LOG|I/O Operation : Write|
|TRACE LOG|Operation : Ioctl|
|TRACE LOG|Ioctl Name : WDIOC_KEEPALIVE|
|TRACE LOG|Ioctl Arg : 0 |
|TRACE LOG| ************* End of Test params ************* |
|TRACE LOG|Keeping WDT alive, sleep counter -0(sec)|
|TEST RESULT|PASS|wdt_tests|
|TEST END|wdt_tests|
|TRACE LOG|EVM will be rebooted after 60 seconds|
|TRACE LOG|59 seconds remaining before reboot|
|TRACE LOG|58 seconds remaining before reboot|
|TRACE LOG|57 seconds remaining before reboot|
|TRACE LOG|56 seconds remaining before reboot|
|TRACE LOG|55 seconds remaining before reboot|
|TRACE LOG|54 seconds remaining before reboot|
|TRACE LOG|53 seconds remaining before reboot|
|TRACE LOG|52 seconds remaining before reboot|
|TRACE LOG|51 seconds remaining before reboot|
|TRACE LOG|50 seconds remaining before reboot|
|TRACE LOG|49 seconds remaining before reboot|
|TRACE LOG|48 seconds remaining before reboot|
|TRACE LOG|47 seconds remaining before reboot|
|TRACE LOG|46 seconds remaining before reboot|
|TRACE LOG|45 seconds remaining before reboot|
|TRACE LOG|44 seconds remaining before reboot|
|TRACE LOG|43 seconds remaining before reboot|
|TRACE LOG|42 seconds remaining before reboot|
|TRACE LOG|41 seconds remaining before reboot|
|TRACE LOG|40 seconds remaining before reboot|
|TRACE LOG|39 seconds remaining before reboot|
|TRACE LOG|38 seconds remaining before reboot|
|TRACE LOG|37 seconds remaining before reboot|
|TRACE LOG|36 seconds remaining before reboot|
|TRACE LOG|35 seconds remaining before reboot|
|TRACE LOG|34 seconds remaining before reboot|
|TRACE LOG|33 seconds remaining before reboot|
|TRACE LOG|32 seconds remaining before reboot|
|TRACE LOG|31 seconds remaining before reboot|
|TRACE LOG|30 seconds remaining before reboot|
|TRACE LOG|29 seconds remaining before reboot|
|TRACE LOG|28 seconds remaining before reboot|
|TRACE LOG|27 seconds remaining before reboot|
|TRACE LOG|26 seconds remaining before reboot|
|TRACE LOG|25 seconds remaining before reboot|
|TRACE LOG|24 seconds remaining before reboot|
|TRACE LOG|23 seconds remaining before reboot|
|TRACE LOG|22 seconds remaining before reboot|
|TRACE LOG|21 seconds remaining before reboot|
|TRACE LOG|20 seconds remaining before reboot|
|TRACE LOG|19 seconds remaining before reboot|
|TRACE LOG|18 seconds remaining before reboot|
|TRACE LOG|17 seconds remaining before reboot|
|TRACE LOG|16 seconds remaining before reboot|
|TRACE LOG|15 seconds remaining before reboot|
|TRACE LOG|14 seconds remaining before reboot|
|TRACE LOG|13 seconds remaining before reboot|
|TRACE LOG|12 seconds remaining before reboot|
|TRACE LOG|11 seconds remaining before reboot|
|TRACE LOG|10 seconds remaining before reboot|
|TRACE LOG|9 seconds remaining before reboot|
|TRACE LOG|8 seconds remaining before reboot|
|TRACE LOG|7 seconds remaining before reboot|
|TRACE LOG|6 seconds remaining before reboot|
|TRACE LOG|5 seconds remaining before reboot|
|TRACE LOG|4 seconds remaining before reboot|
|TRACE LOG|3 seconds remaining before reboot|
|TRACE LOG|2 seconds remaining before reboot|
|TRACE LOG|1 seconds remaining before reboot|
|TRACE LOG|0 seconds remaining before reboot|
|TRACE LOG|-1 seconds remaining before reboot|
|TRACE LOG|-2 seconds remaining before reboot|
|TRACE LOG|-3 seconds remaining before reboot|
|TRACE LOG|-4 seconds remaining before reboot|
|TRACE LOG|-5 seconds remaining before reboot|
|TRACE LOG|-6 seconds remaining before reboot|
|TRACE LOG|-7 seconds remaining before reboot|
|TRACE LOG|-8 seconds remaining before reboot|
|TRACE LOG|-9 seconds remaining before reboot|
Should this test function on this board + SDK? If not, what would be the best approach to setup and test the watchdog?
Best regards,
Rik