imx6 wdt timeout value

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

imx6 wdt timeout value

946 Views
ilyyxfe
Contributor I

hello

i have two question, pls give me some advice.

1. the wdt max timeout value,

i check the manual, it seems to be 128s   (WCR_WT)

but when i set a longer timeout value, it can reset system in my set time value.

about this, do i mistake something?

2.i want to keep wdt work in low power mode.

so i tried the follow action.

 

static inline void imx2_wdt_setup(struct watchdog_device *wdog)
{
struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
u32 val;

regmap_read(wdev->regmap, IMX2_WDT_WCR, &val);

/* Suspend timer in low power mode, write once-only */
//val |= IMX2_WDT_WCR_WDZST;
val &= ~IMX2_WDT_WCR_WDZST;

 

i modify the last line code. but it still can not keep watchdog work in stop mode.

my source is base on 4.9.88.2.0.0

 

the situation is :

i open the watchdog first, then I make system into stop mode. it can not reset in expected timeout . it will keep sleep .

and when i wake up system, it will reset when timeout.

and if I just open the watchdog,and not let system into sleep, it will reset when timeout.

i will appreciate it if you can reply.

best regards

zhang

Labels (3)
0 Kudos
2 Replies

742 Views
ilyyxfe
Contributor I

thank u for reply

i figure out the problem

this reg is write once only

it has been set to 1 during u-boot

so it can not work when i set again in kernel.

0 Kudos

742 Views
jimmychan
NXP TechSupport
NXP TechSupport

By default, WDZST is 0. So, you just comment out the val |= IMX2_WDT_WCR_WDZST; should be ok. You don't need to set it to zero. And you can add a regmap_read() to read the IMX2_WDT_WCR at the end of the imx2_wdt_setup() again and then use 'printk' to print out the 'val' to check the value in the register is correct or not.

0 Kudos