<?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>LPCXpresso IDEのトピックUsing the watchdog on LPC122x</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534702#M4232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by IanJames on Thu Jun 20 07:03:21 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use the watchdog timeout feature on the LPC1224.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using CMSIS I have removed the define symbol __DISABLE_WATCHDOG and recompiled. Now when I program the device as expected the device does continual resets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assumed that 'feeding' the watchdog timer thus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;FEED = 0xAA;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;FEED = 0x55;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;would prevent the resets - alas it does not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The startup code source file&amp;nbsp; states this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// ************************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// The LPC12xx family start up with the Windowed Watchdog timer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// enabled, and if the application code does not continually&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// feed the WWDT, then a reset will occur. This behavior will&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// prevent the debug tools functioning correctly - and thus&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// when a debug connection is made, the tools will disable the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// WWDT. However this will mean that behavior of your application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// may be different depending upon whether the debugger is&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// connected or not. The below code will disable the WWDT in the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// same way that the debugger does, so that behavior will not&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// depend upon whether the debugger is connected or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// If you do not want to connect the debugger to the target and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// require the default LPC12xx WWDT operation, then undefine the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// symbol __DISABLE_WATCHDOG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// For more information, see the LPC12xx User Manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which I understand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone explain what the default settings are for the Windowed Watchdog timer are and what I need to do to prevent the resets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:37:58 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:37:58Z</dc:date>
    <item>
      <title>Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534702#M4232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by IanJames on Thu Jun 20 07:03:21 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use the watchdog timeout feature on the LPC1224.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using CMSIS I have removed the define symbol __DISABLE_WATCHDOG and recompiled. Now when I program the device as expected the device does continual resets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assumed that 'feeding' the watchdog timer thus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;FEED = 0xAA;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;FEED = 0x55;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;would prevent the resets - alas it does not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The startup code source file&amp;nbsp; states this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// ************************************************************&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// The LPC12xx family start up with the Windowed Watchdog timer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// enabled, and if the application code does not continually&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// feed the WWDT, then a reset will occur. This behavior will&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// prevent the debug tools functioning correctly - and thus&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// when a debug connection is made, the tools will disable the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// WWDT. However this will mean that behavior of your application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// may be different depending upon whether the debugger is&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// connected or not. The below code will disable the WWDT in the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// same way that the debugger does, so that behavior will not&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// depend upon whether the debugger is connected or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// If you do not want to connect the debugger to the target and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// require the default LPC12xx WWDT operation, then undefine the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// symbol __DISABLE_WATCHDOG.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// For more information, see the LPC12xx User Manual.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;which I understand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone explain what the default settings are for the Windowed Watchdog timer are and what I need to do to prevent the resets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534702#M4232</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534703#M4233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nkarakotas on Sun Jun 23 05:09:12 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Ian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yet again we meet in a forum! On nxp's now ahhhh?? How is Colin?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:37:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534703#M4233</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534704#M4234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by IanJames on Sun Jun 23 23:04:39 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Nick,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Its been a while - I assume you are back home in Greece or are you now in Australia?.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes we have changed to NXP LPC122x series for our boards, the the face of it they are more powerful and cheaper then AVRs - but a bit more complicated to configure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to get the Watchdog to generate interrupts by enabling it and then 'forgetting' to feed it. It would appear that the Watchdog Timer fails to start.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have wasted so much time on this and there is little help/advice available - just the manual which I have read loads of times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you still working on your Weather Stations?, and what processors are you using for your designs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Colin is well, nothing really changes, we just get older!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:38:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534704#M4234</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534705#M4235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Jun 24 02:12:37 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;As it's a windowed WD maybe you are feeding it too fast.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the value in the WINDOW register, that will determine the low end of the window. I believe it defaults at reset to the WD value ie, no window, but it might be worth checking.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:38:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534705#M4235</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534706#M4236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Mon Jun 24 02:27:25 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso doesn't ship with a Watchdog example for the LPC12, but NXP do have some WDT example code that you might find useful reference at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.lpcware.com/content/nxpfile/lpc12xx-cmsis-driver-library-keil&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:38:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534706#M4236</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using the watchdog on LPC122x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534707#M4237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by IanJames on Tue Jun 25 06:55:16 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I have found so far..........&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I configure the Watchdog for Chip Reset thus:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_SYSCON-&amp;gt;WDTOSCCTRL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x003F;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 001 11111&amp;nbsp; ~8kHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;15);&amp;nbsp;&amp;nbsp; // Enable clock to WDT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_SYSCON-&amp;gt;PDRUNCFG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;= ~(0x1&amp;lt;&amp;lt;6);// ensure watchdog is powered&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;CLKSEL&amp;nbsp; = 0x01;// Watchdog Oscillator as source&amp;nbsp; 0001&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;WARNINT = 0x00;// Interrupt warning value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NVIC_EnableIRQ(WDT_IRQn);// Enable the interrupt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;TC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0xFF; // once WDEN is set, the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC_WWDT-&amp;gt;MOD = 0x0003;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // start in Chip Reset Mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; __disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_WWDT-&amp;gt;FEED = 0xAA;/* Feeding sequence */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; LPC_WWDT-&amp;gt;FEED = 0x55;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;__enable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Make sure feed sequence executed properly */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (i = 0; i &amp;lt; 0x80000; i++);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I compile for Release mode, Program over the SWD, power off remove programmer and power on then everything appears to work correctly i.e. if I feed the watchdog at regular intervals then the processor runs if I disable feeding then the processor resets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I compile for Debug mode and repeat the above then after cycling the power then the processor appears to be in an unknown state - I know this because opon power up a single byte should be transmitted out of the serial port but nothing appears.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only way to recover is to reprogram the chip.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts anyone?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One other point, the manual suggests that if the processor is reset due to a Watchdog Reset then the bit 2 in the LPC_WWDT-&amp;gt;MOD register should be set, but it doesn't appear to be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**** Update ****&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The register LPC_SYSCON-&amp;gt;SYSRESSTAT contains the reset information [POR,EXT,WDT,BOD,SYS]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:38:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Using-the-watchdog-on-LPC122x/m-p/534707#M4237</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:38:01Z</dc:date>
    </item>
  </channel>
</rss>

