<?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 won't start in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549026#M10795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ben1976de on Sun Aug 01 03:21:46 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Correction, I use CMSIS code base. Problem still there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:05:00 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:05:00Z</dc:date>
    <item>
      <title>Watchdog won't start</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549025#M10794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ben1976de on Sat Jul 31 15:31:19 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to initialize the watchdog but it won't start at all.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my init code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;background-color:#cacaca;border:1px solid black;"&gt; &lt;PRE&gt;
//SYSAHBCLKCTRL(Bit 15) is already turned on
void Watchdog_Init(uint32_t ResetTimeOutMs, uint8_t SoftReset)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;WDTCLKSEL = 0x1;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*select Main Clock*/
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;WDTCLKUEN = 0x1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;WDTCLKUEN = 0x0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;WDTCLKUEN = 0x1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!(LPC_SYSCON-&amp;gt;WDTCLKUEN &amp;amp; 0x01));

&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;WDTCLKDIV = (SystemCoreClock/1000000);&amp;nbsp;&amp;nbsp;&amp;nbsp; /*1MHz*/

&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_EnableIRQ(WDT_IRQn);

&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_WDT-&amp;gt;TC = (ResetTimeOutMs*1000/4);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Timeout in ms*/

&amp;nbsp;&amp;nbsp;&amp;nbsp; if(SoftReset)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_WDT-&amp;gt;MOD = WDEN|WDRESET;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_WDT-&amp;gt;MOD = WDEN;

&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_WDT-&amp;gt;FEED = 0xAA;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*Feed Sequence*/
&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_WDT-&amp;gt;FEED = 0x55;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;SPAN&gt;The registers are set correctly, I can see that with the debugger, but the WDTV register stays at 0xFF. When I change workspace to the sample code it seems that something work. I do not use CMSIS. Is that a problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for answering.&lt;/SPAN&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338165" rel="nofollow noopener noreferrer" target="_blank"&gt;1100572_main_serial.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:04:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549025#M10794</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog won't start</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549026#M10795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ben1976de on Sun Aug 01 03:21:46 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Correction, I use CMSIS code base. Problem still there.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:05:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549026#M10795</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog won't start</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549027#M10796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Jesse.Rosenberg on Mon Aug 02 11:52:36 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What device are you targeting (LPC11xx/13xx/17xx) ? Have you seen the "wdt" example projects which are included in LPCXpresso ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you enabling clock power to the WDT elsewhere in your project? I suspect you're missing some code along the lines of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;15);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:05:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Watchdog-won-t-start/m-p/549027#M10796</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:05:01Z</dc:date>
    </item>
  </channel>
</rss>

