how to feed the external hardware watchdog in the imx6sx uboot.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to feed the external hardware watchdog in the imx6sx uboot.

1,158件の閲覧回数
pisces
Contributor II

Hi

we add an external watchdog on our  board. so we need to feed this on our uboot stage.

i had enabled CONFIG_HW_WATCHDOG and CONFIG_IMX_WATCHDOG and also rewrite the function of hw_watchdog_reset. but it still doesn't work.

We use the GPIO1_IO03 to feed the external wd.

code like this:

struct gpio_regs *regs =(struct gpio_regs *)GPIO1_BASE_ADDR;

u32 l;
l = readl(&regs->gpio_dir);
l |= 1 << 3;
writel(l, &regs->gpio_dir);//set dir.

l = readl(&regs->gpio_dr);
l &= ~(1 << 3);
writel(l, &regs->gpio_dr);
 for(i=0;i<1000;i++);
l |= 1 << 3;
writel(l, &regs->gpio_dr);

Once, in uboot, it run to this code, our board will reset auto.

does anyone have any ideas ? or who know how to feed external watchdog correctly on uboot ?

 

thanks.

ラベル(2)
0 件の賞賛
返信
1 返信

1,153件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Frank

 

one can look at uboot wdog documentation

https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/README.watchdog?h=imx_v2020.04_5.4.70_...

there is uboot imx_watchdog_reset() function in driver which seems never used in codes,

one can try to adjust it for external wdog :

https://source.codeaurora.org/external/imx/uboot-imx/tree/drivers/watchdog/imx_watchdog.c?h=imx_v202...

In general may be recommended to post it on uboot mail list

https://lists.denx.de/listinfo/u-boot

 

Best regards
igor

0 件の賞賛
返信