<?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 LPC1769 - Use WDT to Wake-up from Power-Down in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1769-Use-WDT-to-Wake-up-from-Power-Down/m-p/517001#M1962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Scorpio on Wed Nov 12 00:46:36 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using LPCXpresso, LPC 1769. I am trying to wake up the device from Power-down mode, using the WDT. I would like to perform a reset upon wake-up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do the following to setup the WDT and put the device in power-down. LED should blink, then device should go to sleep, WDT overflows and a reset is performed. After the reset I should see the LED blink again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void WDT_Enable( uint32_t timeout_ms )
{
// Internal RC osc.
LPC_WDT-&amp;gt;WDCLKSEL = 0x00;
uint64_t wdt_clk = 4000000/ 4;
uint64_t wdtc = ( ( uint64_t )timeout_msec * wdt_clk ) / 1000;
LPC_WDT-&amp;gt;WDTC = ( uint32_t )wdtc;
LPC_WDT-&amp;gt;WDMOD = 0x03;
LPC_WDT-&amp;gt;WDFEED = 0xAA;
LPC_WDT-&amp;gt;WDFEED = 0x55;
}

void Power_Down_Mode_Set( void )
{

SCB-&amp;gt;SCR = 0x4;
LPC_SC-&amp;gt;PCON = 0x9;
__WFI();
}

int main( void )
{
Led2_init( );
Led2_Toggle( );
delay( 1000 );
Led2_Toggle( );
WDT_Enable( 2000 ); // 2 sec
Power_Down_Mode_Set( );

return 1;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that the device never comes out of Power-Down mode. If I use Sleep mode then the above code works correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any insights on this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:24:47 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:24:47Z</dc:date>
    <item>
      <title>LPC1769 - Use WDT to Wake-up from Power-Down</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1769-Use-WDT-to-Wake-up-from-Power-Down/m-p/517001#M1962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Scorpio on Wed Nov 12 00:46:36 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using LPCXpresso, LPC 1769. I am trying to wake up the device from Power-down mode, using the WDT. I would like to perform a reset upon wake-up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do the following to setup the WDT and put the device in power-down. LED should blink, then device should go to sleep, WDT overflows and a reset is performed. After the reset I should see the LED blink again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void WDT_Enable( uint32_t timeout_ms )
{
// Internal RC osc.
LPC_WDT-&amp;gt;WDCLKSEL = 0x00;
uint64_t wdt_clk = 4000000/ 4;
uint64_t wdtc = ( ( uint64_t )timeout_msec * wdt_clk ) / 1000;
LPC_WDT-&amp;gt;WDTC = ( uint32_t )wdtc;
LPC_WDT-&amp;gt;WDMOD = 0x03;
LPC_WDT-&amp;gt;WDFEED = 0xAA;
LPC_WDT-&amp;gt;WDFEED = 0x55;
}

void Power_Down_Mode_Set( void )
{

SCB-&amp;gt;SCR = 0x4;
LPC_SC-&amp;gt;PCON = 0x9;
__WFI();
}

int main( void )
{
Led2_init( );
Led2_Toggle( );
delay( 1000 );
Led2_Toggle( );
WDT_Enable( 2000 ); // 2 sec
Power_Down_Mode_Set( );

return 1;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that the device never comes out of Power-Down mode. If I use Sleep mode then the above code works correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any insights on this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:24:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1769-Use-WDT-to-Wake-up-from-Power-Down/m-p/517001#M1962</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1769 - Use WDT to Wake-up from Power-Down</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1769-Use-WDT-to-Wake-up-from-Power-Down/m-p/517002#M1963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nerd herd on Wed Nov 12 08:46:00 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Scorpio,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to the user's manual, the wake-up sources for Power-down mode consists of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;"Wake-up from Power-down mode can be brought about by NMI, External Interrupts EINT0 through EINT3, GPIO interrupts, the Ethernet Wake-on-LAN interrupt, Brownout Detect, an RTC Alarm interrupt, a USB input in transition (USB activity interrupt), or a CAN input pin transition, when the related interrupt is enabled."&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately this does not seem to include the watchdog timer. As an alternative, I would the RTC if you are using a board with the external circuitry. Also as a note, is there a reason why you do not use Deep Power-down? It puts the chip into an even lower power mode and is effectively a reset upon wake up, which is coincidentally what you intend on doing anyway. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a link to the user's manual:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fdocuments%2Fuser_manual%2FUM10360.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp.com/documents/user_manual/UM10360.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:24:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1769-Use-WDT-to-Wake-up-from-Power-Down/m-p/517002#M1963</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:24:48Z</dc:date>
    </item>
  </channel>
</rss>

