<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Watchdog restarts even though it is kicked in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615073#M93005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, if I do not enable the watchdog in the uboot, then if an error occurs during booting, the system won't restart. But if I do set it in uboot, then I can't stop it by kicking it. What should I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2017 01:16:59 GMT</pubDate>
    <dc:creator>harisp</dc:creator>
    <dc:date>2017-01-17T01:16:59Z</dc:date>
    <item>
      <title>Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615071#M93003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;imx6ul watchdog not stopping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;imx6ul and I am trying to use the watchdog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;used &amp;nbsp;in my board's .h file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;#define CONFIG_IMX_WATCHDOG &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to enable the watchdog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I go to /uboot_folder/drivers/watchdog/imx_watchdog.c &amp;nbsp;and check&amp;nbsp;what is done:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;#ifdef CONFIG_IMX_WATCHDOG&lt;BR /&gt;void hw_watchdog_reset(void)&lt;BR /&gt;{&lt;BR /&gt; struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;writew(0x5555, &amp;amp;wdog-&amp;gt;wsr);&lt;BR /&gt; writew(0xaaaa, &amp;amp;wdog-&amp;gt;wsr);&lt;BR /&gt;}&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;void hw_watchdog_init(void)&lt;BR /&gt;{&lt;BR /&gt; struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;&lt;BR /&gt; u16 timeout;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;/*&lt;BR /&gt; * The timer watchdog can be set between&lt;BR /&gt; * 0.5 and 128 Seconds. If not defined&lt;BR /&gt; * in configuration file, sets 128 Seconds&lt;BR /&gt; */&lt;BR /&gt;#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS&lt;BR /&gt;#define CONFIG_WATCHDOG_TIMEOUT_MSECS 128000&lt;BR /&gt;#endif&lt;BR /&gt; timeout = (CONFIG_WATCHDOG_TIMEOUT_MSECS / 500) - 1;&lt;BR /&gt;writew(WCR_WDZST | WCR_WDBG | WCR_WDE | WCR_WDT | WCR_SRS |&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;SET_WCR_WT(timeout), &amp;amp;wdog-&amp;gt;wcr);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;hw_watchdog_reset();&lt;BR /&gt;}&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then start my board which runs embedded linux, the board actually restarts &amp;nbsp;after 128 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I try to kick the watchdog by using the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while [ 1 ] ; do sleep 1; echo x &amp;gt; /dev/watchdog; done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run this script, the watchdog replies&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;root@ccimx6ulstarter:~# ./script &lt;BR /&gt;watchdog watchdog0: watchdog did not stop!&lt;BR /&gt;watchdog watchdog0: watchdog did not stop!&lt;BR /&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;......&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;watchdog watchdog0: watchdog did not stop!&lt;BR /&gt;watchdog watchdog0: watchdog did not stop!&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;U-Boot dub-2015.04-r5.4+ga397dea (Jan 13 2017 - 15:09:55)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)&lt;BR /&gt;CPU: Industrial temperature grade (-40C to 105C) at 40C&lt;BR /&gt;Reset cause: WDOG&lt;BR /&gt;I2C: ready&lt;BR /&gt;DRAM: 256 MiB&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;......&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So despite the fact that I am kicking the watchdog, the watchdog restarts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same happens when I use command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;watchdog -t 10 /dev/watchdog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way of making the system work is not using the&amp;nbsp;&lt;SPAN&gt;WCR_WDE flag.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;When I do this, the watchdog does not start automatically, but I can start it with&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;echo V &amp;gt; /dev/watchdog&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Then the watchdog starts and with my script I can kick it and when the script ends it restarts. However, I want the watchdog to start automatically with&amp;nbsp;&lt;SPAN&gt;WCR_WDE flag.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;How can I solve this problem?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 15:46:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615071#M93003</guid>
      <dc:creator>harisp</dc:creator>
      <dc:date>2017-01-13T15:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615072#M93004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Haris&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WCR_WDE&lt;/SPAN&gt; is a write one once only bit as described in &lt;/P&gt;&lt;P&gt;sect.57.7.1 Watchdog Control Register (WDOGx_WCR)&amp;nbsp; i.MX6UL Reference Manual &lt;/P&gt;&lt;P&gt;&lt;A href="http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6ULRM.pdf"&gt;http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6ULRM.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So if it is set in uboot, it can not be changed in linux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 00:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615072#M93004</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-01-17T00:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615073#M93005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, if I do not enable the watchdog in the uboot, then if an error occurs during booting, the system won't restart. But if I do set it in uboot, then I can't stop it by kicking it. What should I do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 01:16:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615073#M93005</guid>
      <dc:creator>harisp</dc:creator>
      <dc:date>2017-01-17T01:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615074#M93006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try to enable it in linux using Chapter 48&lt;BR /&gt;Watchdog (WDOG) Driver attached Linux Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 05:41:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615074#M93006</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-01-17T05:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615075#M93007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can enable it in linux by writing V to /dev/watchdog. This starts it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I don't enable it in uboot, then if the system fails during boot time, the watchdog doesn't restart the system. I do over the air updates and usually the root file system does not get updated correctly and so I need to start the watchdog in the bootloader. But I want to start it in the bootloader and be able to kick it from linux. How can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 12:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615075#M93007</guid>
      <dc:creator>harisp</dc:creator>
      <dc:date>2017-01-17T12:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog restarts even though it is kicked</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615076#M93008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any news on that ? I'm also having the same issue...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 22:12:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Watchdog-restarts-even-though-it-is-kicked/m-p/615076#M93008</guid>
      <dc:creator>thomas-pub</dc:creator>
      <dc:date>2018-07-02T22:12:12Z</dc:date>
    </item>
  </channel>
</rss>

