This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM6548: How to set watchdog timeout timer

Part Number: AM6548

Tool/software: Linux

Hi,

Currently the timeout of AM65XX's watchdog is ~120s, is there any way to change it to another value?

Thanks.

  • Hi Baocheng,

    How do you generate the timeout event? Do you follow below user guide?

    You might try to change the default timeout value through the linux driver and see if that will work for you.

    linux-4.19.38/drivers/watchdog/keystone_wdt.c

    Regards,
    Pavel

  • Hi Pavel,

    Thanks for your reply.

    Yeah I do follow the user guide and the watchdog actually could reset the system within ~120s after killing the watchdog daemon.

    Indeed one can change the timeout value from the kernel driver, however what I really need is a way to change the timeout value in the user space, I think there sould be an API to change the timeout value in the Linux watchdog framework, but I don't know if it is implemented in the AM65xx kernel driver.

    Best Regards,

    Baocheng

  • Baocheng,

    From what I am able to find, WDT APIs (WDIOC_SETTIMEOUT or WDIOF_SETTIMEOUT) are not implemented in the keystone_wdt.c driver.

    Regards,
    Pavel

  • Baocheng,

    I received additional info from our team.

    The timeout seems to be high because we simulate the timeout by disabling the watchdog daemon instead of killing the kernel. After the watchdog daemon intends to stop the watchdog, the watch dog will still be feed two or three times by the kernel driver before it is allowed to be expired. In the real use case, the timeout will occurs within 60 seconds ( default timeout value) after the kernel crashing.

    Due to the hardware limitation, the timeout (watchdog preload value) can only be changed before the watchdog is enabled and the watchdog can only be enabled once and therefore it is not practical to implement the set_timeout API because it is usually invoked after the start() API.

    What is your desired timeout value?

    Regards,
    Pavel