AnsweredAssumed Answered

imx6q sw watchdog timeout

Question asked by Angelo Dureghello on Oct 29, 2019
Latest reply on Nov 5, 2019 by Angelo Dureghello

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

Outcomes