<?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: Having a lockup in the I2C code in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721209#M29158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-userid="348865" data-username="asobralg1@gmail.com" href="https://community.nxp.com/people/asobralg1@gmail.com"&gt;Alejandro Sobral&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please create a new question post about your own question, then our LPC engineer will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I don't support the LPC product now, thanks a lot for your understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Oct 2019 04:01:20 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2019-10-03T04:01:20Z</dc:date>
    <item>
      <title>Having a lockup in the I2C code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721206#M29155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using lpcopen_2_10_keil_iar_nxp_lpcxpresso_1769 and having random lockups in this code in bold:&lt;/P&gt;&lt;P&gt;/* Chip event handler interrupt based */&lt;BR /&gt;void Chip_I2C_EventHandler(I2C_ID_T id, I2C_EVENT_T event)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;struct i2c_interface *iic = &amp;amp;i2c[id];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;volatile I2C_STATUS_T *stat;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Only WAIT event needs to be handled */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (event != I2C_EVENT_WAIT) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;return;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;stat = &amp;amp;iic-&amp;gt;mXfer-&amp;gt;status;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Wait for the status to change */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;while (*stat == I2C_STATUS_BUSY) {}&lt;/STRONG&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code will run sometimes minute, sometimes once. When it hangs it is always there. The fact that a library has a dead loop is bad enough.&lt;/P&gt;&lt;P&gt;Has anyone seen issues with these libraries? Any thoughts on could be hanging the I2C bus? I scoped the lines and power and all are very clean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any direction would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 18:42:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721206#M29155</guid>
      <dc:creator>jeffjacobson</dc:creator>
      <dc:date>2018-03-21T18:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Having a lockup in the I2C code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721207#M29156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; When you scope the I2C lines, and the problem happens, any abnormal things? You also can insert your I2C bus wave.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please tell me your LPC1769 is the I2C master or the slave? Then I will do the test on my side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Fri, 23 Mar 2018 09:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721207#M29156</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-03-23T09:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Having a lockup in the I2C code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721208#M29157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Community, specially Kerry:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have this problem, the code is running on a loop during the while&amp;nbsp;&lt;SPAN&gt;while (*stat == I2C_STATUS_BUSY).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm using a LPC1769. I'll attacht the configuration function, just to share, i think that the problem isn't there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void Chip_I2C_EventHandlerPolling(I2C_ID_T id, I2C_EVENT_T event)&lt;BR /&gt;{&lt;BR /&gt; struct i2c_interface *iic = &amp;amp;i2c[id];&lt;BR /&gt; volatile I2C_STATUS_T *stat;&lt;/P&gt;&lt;P&gt;/* Only WAIT event needs to be handled */&lt;BR /&gt; if (event != I2C_EVENT_WAIT) {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;stat = &amp;amp;iic-&amp;gt;mXfer-&amp;gt;status;&lt;BR /&gt; /* Call the state change handler till xfer is done */&lt;BR /&gt; while (*stat == I2C_STATUS_BUSY) {&lt;BR /&gt; if (Chip_I2C_IsStateChanged(id)) {&lt;BR /&gt; Chip_I2C_MasterStateHandler(id);&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void init_memoriai2c (void)&lt;BR /&gt;{&lt;BR /&gt; //Inicializo i2c de la memoria&lt;BR /&gt; Chip_IOCON_PinMux(LPC_IOCON, I2C_DEVICE_PORT, I2C_SDA_PIN, IOCON_MODE_INACT, IOCON_FUNC3);&lt;BR /&gt; Chip_IOCON_PinMux(LPC_IOCON, I2C_DEVICE_PORT, I2C_SCL_PIN, IOCON_MODE_INACT, IOCON_FUNC3);&lt;BR /&gt; Chip_IOCON_EnableOD(LPC_IOCON,I2C_DEVICE_PORT, I2C_SDA_PIN);&lt;BR /&gt; Chip_I2C_Init(I2C_DEVICE_NUM_MEMR);&lt;BR /&gt; Chip_I2C_SetClockRate(I2C_DEVICE_NUM_MEMR,I2C_SPEED_MMR);&lt;BR /&gt; Chip_I2C_SetMasterEventHandler(I2C_DEVICE_2,Chip_I2C_EventHandlerPolling);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Port 0, SDAPin = 0, SCLPin = 1,&amp;nbsp;I2C_DEVICE_NUM_MEMR = 2,&amp;nbsp;I2C_SPEED_MMR = 256000,&amp;nbsp;I2C_DEVICE_2 = IC2C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2019 23:10:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721208#M29157</guid>
      <dc:creator>asobralg1</dc:creator>
      <dc:date>2019-09-30T23:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Having a lockup in the I2C code</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721209#M29158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-userid="348865" data-username="asobralg1@gmail.com" href="https://community.nxp.com/people/asobralg1@gmail.com"&gt;Alejandro Sobral&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Please create a new question post about your own question, then our LPC engineer will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I don't support the LPC product now, thanks a lot for your understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 04:01:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Having-a-lockup-in-the-I2C-code/m-p/721209#M29158</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2019-10-03T04:01:20Z</dc:date>
    </item>
  </channel>
</rss>

