Hi all,
i was trying to set a 10 seconds timeout to the imx6 wdt ,referring to imx2-wdt driver, by
regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
WDOG_SEC_TO_COUNT(new_timeout));
just after i reload the counter by:
#define IMX2_WDT_WSR 0x02 /* Service Register */
#define IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */
#define IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */
regmap_write(wdev->regmap, IMX2_WDT_WSR, IMX2_WDT_SEQ1);
regmap_write(wdev->regmap, IMX2_WDT_WSR, IMX2_WDT_SEQ2);
Watchdog timeout then happens somewhere between 5 and 10 secs, so much before the desired 10 seconds .
Double checked this also using sa mod_timer of 10secs, it never reaches the callback since watchdog reset happens before.
Why ?
Thanks to all,
Angelo
Hi Angelo
what bsp used in the case, one can try with nxp releases from
source.codeaurora.org/external/imx/linux-imx repository
Also one can pay attention that some watchdog registes are write-once only,
as described in Chapter 70 Watchdog Timer (WDOG)
i.MX 6Dual/6Quad Applications Processor Reference Manual
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
thanks but providing manuals does not help much, i am following reference manual.
It is clearly said that once set a new timeout, after "servicing" (writing proper wdog sequence), timer should restart with new timeout.
But if i set a timer of same interval minus 1 sec, i never get the timer callback. And also by a rough count, setting timeout to 10 seems to happen at 7 seconds.
Hi Angelo
one can check
https://community.nxp.com/thread/431260
May be recommended to try with nxp releases from
source.codeaurora.org/external/imx/linux-imx repository
Best regards
igor