Difference between revisions of "R-Car/Boards/Yocto-Gen3-CommonFAQ/How to use Watchdog timer."
(Created page with "== How to use Watchdog timer. == Start/Reset timer:<br/> ex) using echo:<br/> <syntaxhighlight lang=text> echo > /dev/watchdog </syntaxhighlight> End timer:<br/> ex) using...") |
(→How to use Watchdog timer.) |
||
Line 14: | Line 14: | ||
After the timeouts(default: 60 seconds), device reboots.<br/> | After the timeouts(default: 60 seconds), device reboots.<br/> | ||
+ | |||
+ | ===== How to change timeout-sec ===== | ||
+ | <syntaxhighlight lang=text> | ||
+ | bitbake linux-renesas | ||
+ | |||
+ | vim ${WORK}/build/tmp/work-shared/h3ulcb/kernel-source/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | ||
+ | # add following lines: | ||
+ | ``` | ||
+ | &rwdt { | ||
+ | timeoout-sec = <10>; | ||
+ | }; | ||
+ | ``` | ||
+ | |||
+ | cd ${WORK}/build/tmp/work-shared/h3ulcb/kernel-source/ | ||
+ | |||
+ | git add arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts | ||
+ | git commit -m "arm64: dts: r8a7795-h3ulcb.dts: Add timeout-sec = <10>" | ||
+ | git format-patch -1 | ||
+ | |||
+ | cp ./0001-arm64-dts-r8a7795-h3ulcb.dts-Add-timeout-sec-10.patch \ | ||
+ | ${WORK}/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/ | ||
+ | |||
+ | echo -e 'SRC_URI_append = "\\\n file://0001-arm64-dts-r8a7795-h3ulcb.dts-Add-timeout-sec-10.patch\\\n"' \ | ||
+ | > ${WORK}/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend | ||
+ | |||
+ | bitbake linux-renesas | ||
+ | </syntaxhighlight> | ||
See also: | See also: | ||
* https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html | * https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html | ||
− | |||
[[Category: R-Car/FAQ/Gen3]] | [[Category: R-Car/FAQ/Gen3]] |
Revision as of 01:50, 12 November 2020
How to use Watchdog timer.
Start/Reset timer:
ex) using echo:
echo > /dev/watchdog
End timer:
ex) using echo:
echo "V" > /dev/watchdog
After the timeouts(default: 60 seconds), device reboots.
How to change timeout-sec
bitbake linux-renesas
vim ${WORK}/build/tmp/work-shared/h3ulcb/kernel-source/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
# add following lines:
```
&rwdt {
timeoout-sec = <10>;
};
```
cd ${WORK}/build/tmp/work-shared/h3ulcb/kernel-source/
git add arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
git commit -m "arm64: dts: r8a7795-h3ulcb.dts: Add timeout-sec = <10>"
git format-patch -1
cp ./0001-arm64-dts-r8a7795-h3ulcb.dts-Add-timeout-sec-10.patch \
${WORK}/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas/
echo -e 'SRC_URI_append = "\\\n file://0001-arm64-dts-r8a7795-h3ulcb.dts-Add-timeout-sec-10.patch\\\n"' \
> ${WORK}/meta-renesas/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_4.14.bbappend
bitbake linux-renesas
See also: