imx6q sw watchdog timeout

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6q sw watchdog timeout

1,000 Views
angelo_d
Senior Contributor I

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

Labels (2)
0 Kudos
3 Replies

879 Views
igorpadykov
NXP Employee
NXP Employee

Hi Angelo

what bsp used in the case, one can try with nxp releases from

source.codeaurora.org/external/imx/linux-imx repository

linux-imx - i.MX Linux kernel 

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

879 Views
angelo_d
Senior Contributor I

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.

0 Kudos

879 Views
igorpadykov
NXP Employee
NXP Employee

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

linux-imx - i.MX Linux kernel 

Best regards
igor

0 Kudos