cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Participant
Participant
560 Views
Registered: ‎09-11-2017

enable watchdog in u-boot

Hi !

We use zynq-7000 SoC.  We enable watchdog support in DTS file and watchdog works in Linux fine.  How can I get watchdog working in u-boot ?  I would like to load recovery linux image in case of loading linux freezes (broken image, broken rootfs, etc).  Is it possible ?

Tags (2)
0 Kudos
Reply
6 Replies
Contributor
Contributor
454 Views
Registered: ‎06-03-2018

Hello, 

I had enabled watchdog in u boot by adding 

#DEFINE CONFIG_WD

#DEFINE CONFIG_WDT_CDNS

In platform-top.h file in petalinux, 

Hope this solves your problem

0 Kudos
Reply
Participant
Participant
440 Views
Registered: ‎09-11-2017

I added CONFIG_WD and CONFIG_WDT_CDNS

through project-spec/meta-user/recipes-bsp/u-boot/files/user_XXX.cfg and rebuild u-boot. I have tested watchdog timer in u-boot : it does not work.  What have I missed ? How can I tune watchdog parameters ?

0 Kudos
Reply
Contributor
Contributor
438 Views
Registered: ‎06-03-2018

Did you set pmu flag to enable hardware watchdog?

Is it working in linux?

Which petalinux version ru using?

0 Kudos
Reply
Participant
Participant
436 Views
Registered: ‎09-11-2017

Watchdog works in linux as expected.
We use petalinux 2017.2
Where must I enable PMU flag to enable hardware watchdog ?
0 Kudos
Reply
Contributor
Contributor
423 Views
Registered: ‎06-03-2018

Sorry not for zynq 7000, pmu flags are only for zynq ultra scale, I have similar issue with uboot after upgrading to petalinux 2020.1, I will update once I solve it, but in 2019.2 it worked for me by adding that lines in platform-top.h file. 

0 Kudos
Reply
Contributor
Contributor
400 Views
Registered: ‎06-03-2018

Hi

I found the solution Please also enable this flags in .cfg

CONFIG_SYSRESET_WATCHDOG=y

CONFIG_SPL_WATCHDOG_SUPPORT=y

CONFIG_SPL_WDT=y

CONFIG_WDT_CDNS=y

CONFIG_WDT=y

0 Kudos
Reply