Clearification on imx8mp watchdog.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Clearification on imx8mp watchdog.

ソリューションへジャンプ
1,071件の閲覧回数
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 解決策
1,048件の閲覧回数
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 返答(返信)
1,049件の閲覧回数
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 件の賞賛
返信
992件の閲覧回数
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 件の賞賛
返信