<?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: I2C Slave pulls SDA and SCL Pins low when entering Power Down mode in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566301#M17271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nxp_apps on Fri Feb 21 14:33:18 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The application note + software works. Have you monitored the CLKOUT pin to see if the device went into power-down mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The observed clock on the CLKOUT pin should go low since all internal clocks are shut down in power-down mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the example code, the command to place the LPC812 into power-down is the I2C slave address 0x54 followed by data byte 0xAA,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just want to make sure first that the lpc812 went into power-down mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nxp_apps&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:10:55 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:10:55Z</dc:date>
    <item>
      <title>I2C Slave pulls SDA and SCL Pins low when entering Power Down mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566300#M17270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by skywalk on Mon Feb 10 09:14:53 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to test LPC812 power modes and use the LPCXpresso LPC812 Board and the NXP AN11332-Software together with LPCXpresso 6.1.4.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AN11332 Code works until the Device goes to "Power-Down" mode (not Deep-Power-Down).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At this moment, the SDA and SCL pins go low (~0.5 Vdc) voltage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That disables all other I2C Traffic on the bus and the LPC will never get its Address for waking from Power-Down.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This would make the "wake from I2C" unsuable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As far as i understand the AN11332 Code, it should work fine; the configuration seems to be OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has somebody used the LPC812 I2C as an Slave and configured it for Power-Down?&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;
/*connect the I2C SCL and SDA sigals to port pins(P0.10-P0.11)*/
regVal = LPC_SWM -&amp;gt;PINASSIGN7 &amp;amp; ~(0xFFUL &amp;lt;&amp;lt; 24);
LPC_SWM -&amp;gt;PINASSIGN7 = regVal | (10 &amp;lt;&amp;lt; 24); /* P0.10 is I2C SDA, ASSIGN0(31:24) */
regVal = LPC_SWM -&amp;gt;PINASSIGN8 &amp;amp; ~(0xFF &amp;lt;&amp;lt; 0);
LPC_SWM -&amp;gt;PINASSIGN8 = regVal | (11 &amp;lt;&amp;lt; 0); /* P0.11 is I2C SCL. ASSIGN0(7:0) */

LPC_SYSCON -&amp;gt;CLKOUTDIV = 120; /* CLKOUT = 60E6 / 120 = 500 kHz */
LPC_SYSCON -&amp;gt;CLKOUTSEL = 0x03; /* CLKOUT = Main clock */
LPC_SYSCON -&amp;gt;CLKOUTUEN = 0x01; /* Update CLKOUT Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */

LPC_GPIO_PORT -&amp;gt;DIR0 |= (1 &amp;lt;&amp;lt; 5);
regVal = LPC_SWM -&amp;gt;PINASSIGN8 &amp;amp; ~(0xFF &amp;lt;&amp;lt; 16);
LPC_SWM -&amp;gt;PINASSIGN8 = regVal | (0x0F &amp;lt;&amp;lt; 16); /* P0.15 is CLKOUT. ASSIGN8(23:16) */

LPC_GPIO_PORT -&amp;gt;DIR0 |= (1 &amp;lt;&amp;lt; 7);
SysTick_Config(SystemCoreClock / 2);

/* Enable I2C clock */
LPC_SYSCON -&amp;gt;SYSAHBCLKCTRL |= (1 &amp;lt;&amp;lt; 5);
/* Toggle peripheral reset control to I2C, a "1" bring it out of reset. */
LPC_SYSCON -&amp;gt;PRESETCTRL &amp;amp;= ~(0x1 &amp;lt;&amp;lt; 6);
LPC_SYSCON -&amp;gt;PRESETCTRL |= (0x1 &amp;lt;&amp;lt; 6);

I2C_SlvInit(LPC_I2C, SLAVE_ADDR, CFG_SLVENA, I2C_FMODE_PRE_DIV);
/* Ready to receive the slave address, interrupt(SLAVE ADDR STATE) if match occurs. */
LPC_I2C -&amp;gt;SLVCTL = CTL_SLVCONTINUE;
LPC_I2C -&amp;gt;INTENSET = STAT_SLVPEND;

/* Enable wake from power down using I2C */
LPC_SYSCON -&amp;gt;STARTERP1 |= (1 &amp;lt;&amp;lt; 8);

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;
/*****************************************************************************
** Function name:PMU_Sleep
**
** Descriptions:Put some of the peripheral in sleep mode.
**
** parameters:SleepMode: 2 is power down, 1 is deep sleep, 0 is sleep, Sleep peripheral module(s)
** Returned value:None
** 
*****************************************************************************/
void PMU_Sleep( uint32_t SleepMode, uint32_t SleepCtrl )
{
&amp;nbsp; LPC_SYSCON-&amp;gt;PDAWAKECFG = LPC_SYSCON-&amp;gt;PDRUNCFG;
&amp;nbsp; LPC_SYSCON-&amp;gt;PDSLEEPCFG = SleepCtrl;
&amp;nbsp; /* If normal sleep, not deep sleep, don't do anything to SCR reg. */
&amp;nbsp; switch ( SleepMode )
&amp;nbsp; {
case MCU_POWER_DOWN:
&amp;nbsp; SCB-&amp;gt;SCR |= NVIC_LP_SLEEPDEEP;
#if __WKT
&amp;nbsp; LPC_PMU-&amp;gt;DPDCTRL |= (0x1 &amp;lt;&amp;lt; 2);
&amp;nbsp; init_wkt(1, 10000 * 10);
#endif
#if 1
&amp;nbsp; LPC_PMU-&amp;gt;PCON = 0x2;
#else
&amp;nbsp; LPC_SYSCON-&amp;gt;PDSLEEPCFG &amp;amp;= 0xFDFF;
#endif
&amp;nbsp; break;
case MCU_DEEP_SLEEP:
&amp;nbsp; SCB-&amp;gt;SCR |= NVIC_LP_SLEEPDEEP;
#if __WKT
&amp;nbsp; LPC_PMU-&amp;gt;DPDCTRL |= (0x1 &amp;lt;&amp;lt; 2);
&amp;nbsp; init_wkt(1, 10000 * 10);
#endif
#if 1
&amp;nbsp; LPC_PMU-&amp;gt;PCON = 0x1;
#else
&amp;nbsp; LPC_SYSCON-&amp;gt;PDSLEEPCFG &amp;amp;= 0xEFF9;
#endif
&amp;nbsp; break;
case MCU_SLEEP:
default:
&amp;nbsp; break;
&amp;nbsp; }
&amp;nbsp; __WFI();
&amp;nbsp; return;
}

&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:10:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566300#M17270</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Slave pulls SDA and SCL Pins low when entering Power Down mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566301#M17271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nxp_apps on Fri Feb 21 14:33:18 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The application note + software works. Have you monitored the CLKOUT pin to see if the device went into power-down mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The observed clock on the CLKOUT pin should go low since all internal clocks are shut down in power-down mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the example code, the command to place the LPC812 into power-down is the I2C slave address 0x54 followed by data byte 0xAA,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I just want to make sure first that the lpc812 went into power-down mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nxp_apps&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:10:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566301#M17271</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Slave pulls SDA and SCL Pins low when entering Power Down mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566302#M17272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by skywalk on Sat Feb 22 02:17:10 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;yes, the CLKOUT is low when entering the power-down mode!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found that the software works if no optimization is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT if the software is compiled with optimization for program space ( i need the program space for a FATfs based application), the situation as described in my original post will show up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As soon as i have found the reason for this behaviour, i will post the result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566302#M17272</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Slave pulls SDA and SCL Pins low when entering Power Down mode</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566303#M17273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Sat Feb 22 07:33:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Please red this FAQ&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.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcompiler-optimization" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Especially the section called &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Optimized code fails to execute correctly&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I2C-Slave-pulls-SDA-and-SCL-Pins-low-when-entering-Power-Down/m-p/566303#M17273</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:10:56Z</dc:date>
    </item>
  </channel>
</rss>

