how to enable watchdog under uboot

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

how to enable watchdog under uboot

Jump to solution
5,136 Views
jonnyju
Contributor I


Dear all

     i'm working on an imx28 rev D board.

     i want to enable watchdog under uboot,

     so i use mw command to modify reg's value to enable watchodg

     command is:

     > mw.l 0x80056004 0x00000018

     > mw.l 0x80056050 0x00001400

     after 5 seconds, the board does reset, by it cannot restart.

     and only print: H0x80501003 and 0x80502008.

     what else should be done?

     and another question is the code in kernel @wdt_enable func:

     static void wdt_enable(u32 value)

     {

          ......

          __raw_writel(BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATER,

                         wdt_base + HW_RTC_PERSISTENT1_SET);

          ......

     }

     why should we wirte BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATER into HW_RTC_PERSISTENT1_SET?

     because these is no description about this.

     thks all

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,199 Views
GraceH
Senior Contributor II

1. You need set HW_RTC_PERSISTENT0  bit AUTO_RESTART to 1.

mw.l 0x80056064 0x00020000

mw.l 0x80056004 0x00000018

mw.l 0x80056050 0x00001400

2. For the RTC_PERSISTENT1, except those described in reference manual, the other fields are for customer use.

bit BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATE is used for watchdog driver to get boot status mxs_wdt_ioctl.

View solution in original post

0 Kudos
1 Reply
1,200 Views
GraceH
Senior Contributor II

1. You need set HW_RTC_PERSISTENT0  bit AUTO_RESTART to 1.

mw.l 0x80056064 0x00020000

mw.l 0x80056004 0x00000018

mw.l 0x80056050 0x00001400

2. For the RTC_PERSISTENT1, except those described in reference manual, the other fields are for customer use.

bit BV_RTC_PERSISTENT1_GENERAL__RTC_FORCE_UPDATE is used for watchdog driver to get boot status mxs_wdt_ioctl.

0 Kudos