Clearification on imx8mp watchdog.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Clearification on imx8mp watchdog.

跳至解决方案
849 次查看
ababatola
Contributor III

Hi,

I would like to test my i.mx8mp hardware watchdog and I need a clarification on this.

The command 

         echo 'V' > /dev/watchdog

disables he watchdog?  Which means that the watchdog is no longer working.

After executing this command and them I enter the below command 

         cat >> /dev/watchdog

The watchdog operates as expected and resets the system.

My understanding is that if the watchdog is disabled, the above command should not lead to a reset unless the watchdog is enabled back.

Also after the 

echo 'V' > /dev/watchdog

command the watchdog daemon is still working.  This is an extract from my shell

~ # echo 'V' > /dev/watchdog
~ # ps -e | grep watchdogd
81 root [watchdogd]
330 root grep watchdogd

Is this behaviour correct?

Thanks

 

 

 

0 项奖励
回复
1 解答
826 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

I hope you are doing well.

According to the Kernel documentation that is called the 'Magic Close' feature:

If a driver supports "Magic Close", the driver will not disable the watchdog unless a specific magic character 'V' has been sent to /dev/watchdog just before closing the file. If the userspace daemon closes the file without sending this special character, the driver will assume that the daemon (and userspace in general) died, and will stop pinging the watchdog without disabling it first. This will then cause a reboot if the watchdog is not re-opened in sufficient time.

And according to the i.MX Linux reference manual:

After the WDOG timer is activated, it must be serviced by software on a periodic basis and the watchdog module cannot be deactivated after it is activated.

Best regards.

Jorge.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
827 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

I hope you are doing well.

According to the Kernel documentation that is called the 'Magic Close' feature:

If a driver supports "Magic Close", the driver will not disable the watchdog unless a specific magic character 'V' has been sent to /dev/watchdog just before closing the file. If the userspace daemon closes the file without sending this special character, the driver will assume that the daemon (and userspace in general) died, and will stop pinging the watchdog without disabling it first. This will then cause a reboot if the watchdog is not re-opened in sufficient time.

And according to the i.MX Linux reference manual:

After the WDOG timer is activated, it must be serviced by software on a periodic basis and the watchdog module cannot be deactivated after it is activated.

Best regards.

Jorge.

0 项奖励
回复
770 次查看
ababatola
Contributor III

hi,

I exported the watchdog timer to the sysfs, however only watchdog0 was exported to the userspace and not watchdog.  He is the output from my linux terminal

~ # ls /dev/watch*
/dev/watchdog dev/watchdog0
~ # ls /sys/class/watch*
watchdog0

Why is the watchdog not exported to the sysfs so that I can inspect the parameters of the watchdog timer.

Thanks

 

0 项奖励
回复