<?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: LPC55S69 I2C stuck after SCK disconnect/connect in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1381133#M47232</link>
    <description>&lt;P&gt;Ok if you are aware of this point.&lt;/P&gt;&lt;P&gt;I would make a trace of of the I2C bus, covering the failing transfer and preverably a few transfers before. And check where exactly the problem happens, and relate it to your (or the SDK) code.&lt;/P&gt;&lt;P&gt;Perhaps experimenting with different (lower) SCL speeds, pull-up resistors, and boards.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 08:50:33 GMT</pubDate>
    <dc:creator>frank_m</dc:creator>
    <dc:date>2021-12-03T08:50:33Z</dc:date>
    <item>
      <title>LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1375495#M47082</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I accidentally found a way to get I2C stuck and so far could not find a solution for it. Hope someone can give some hints.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LPC55S69 Evaluation board&lt;/LI&gt;&lt;LI&gt;SI7055 I2C temperature sensor connected to FC2&lt;/LI&gt;&lt;LI&gt;Using NXP I2C driver and freeRTOS on top of those&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Case if fairly simple. Temperature measurements means that we write one byte to sensor, wait for a while and read result.&lt;/P&gt;&lt;P&gt;I noticed that if I disconnect SCK wire, temperature reading(I2C write) fails(naturally). If I then connect SCK again and try to read temperature, I2C write never returns. Bug is in MCU side, sensor does not keep lines down or anything.&lt;/P&gt;&lt;P&gt;What I have found out so far is that in RTOS driver level it does not return because NXP driver never calls the `I2C_RTOS_Callback` given to `I2C_MasterTransferCreateHandle`. In NXP level it hangs because `I2C_RunTransferStateMachine` called by `I2C_MasterTransferHandleIRQ` is called only once(`kStartState`) and then nothing. I2C also sends nothing to lines when it gets stuck(checked with scope)&lt;/P&gt;&lt;P&gt;I have tried to eyeball and debug the driver code, but it looks solid to me. I am suspecting that maybe the actual I2C peripheral is somehow messed up.&lt;/P&gt;&lt;P&gt;When I disconnect the SCK, I can see following events in NXP I2C driver(I2C_RunTransferStateMachine)&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;status=5244961, state=6(kStartState) -&amp;gt; result=0&lt;BR /&gt;status=5245025, state=2(kTransmitDataState) -&amp;gt; result=2608(kStatus_I2C_StartStopError)&lt;BR /&gt;// RTOS callback called -&amp;gt; error returned to application&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And after this next write is just&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;status=5244961, state=6 -&amp;gt; result=0&lt;/P&gt;&lt;P&gt;//Stuck&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For reference, if I disconnect SDA wire, writing the byte fails like this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;status=5244961, state=6 -&amp;gt; result=0&lt;BR /&gt;status=5245057, state=2 -&amp;gt; result=2611(kStatus_I2C_Addr_Nak)&lt;BR /&gt;// RTOS callback called -&amp;gt; error returned to application&lt;BR /&gt;status=5244961, state=0 -&amp;gt; result=2609(kStatus_I2C_UnexpectedState)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;After this I2C is working just fine and interrupts from I2C are coming through if I connect the SDA again.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 09:02:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1375495#M47082</guid>
      <dc:creator>Fastfox</dc:creator>
      <dc:date>2021-11-23T09:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1376003#M47090</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A id="link_12" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192074" target="_self" aria-label="View Profile of Fastfox"&gt;&lt;SPAN class=""&gt;Fastfox&lt;/SPAN&gt;&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;How about restart I2C after stuck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 07:01:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1376003#M47090</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-11-24T07:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1376036#M47093</link>
      <description>&lt;P&gt;I have tried to abort/deinit/init after the failure(i.e. not after it is stuck). It seems to help maybe 50% of time. "Help" meaning that it does not get stuck when used for the next time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not tried to recover from stuck I2C as it is a bit complex. You would need to kill/restart RTOS task, RTOS driver sempahores and stuff.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 07:49:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1376036#M47093</guid>
      <dc:creator>Fastfox</dc:creator>
      <dc:date>2021-11-24T07:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380504#M47210</link>
      <description>&lt;P&gt;Hello Fastfox,&lt;/P&gt;
&lt;P&gt;Yes, I also meaning deinit and init after stuck. What about other 50% time, do you mean even thought deinit/init, it still can't communicate with I2C salve?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 09:18:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380504#M47210</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2021-12-02T09:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380598#M47213</link>
      <description>&lt;P&gt;Yes that is what it means. 50% of times after deinit/init, no interrupts coming from I2C.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 11:41:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380598#M47213</guid>
      <dc:creator>Fastfox</dc:creator>
      <dc:date>2021-12-02T11:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380733#M47216</link>
      <description>&lt;P&gt;I think the problem is your external I2C device, the SI7055.&lt;/P&gt;&lt;P&gt;Most I2C devices are static designs, i.e. have static state machines. If you interrupt a read or write transfer in the middle (not all 9 bits transferred), it gets stuck in that state machine.&lt;/P&gt;&lt;P&gt;The usual way to resolve this is to reconfigure the I2C pins as GPIOs (with OD), and pulse SCL until SDA is released.&lt;/P&gt;&lt;P&gt;Or, a power cycle that resets both master and slave node. Or, hypothetically, you could powercycle the slave alone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:12:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380733#M47216</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-12-02T15:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380981#M47222</link>
      <description>&lt;P&gt;Hi frank_meyer,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;I think the problem is your external I2C device, the SI7055&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have already tried to confirm that this is not the case this before contacting you. There are two things that hint the opposite IMHO.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Bug is in MCU side, sensor does not keep lines down or anything&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;I2C also sends nothing to lines when it gets stuck(checked with scope)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have also tried to e.g. power cycle the sensor, but it is still in initial state(does nothing, does not draw the lines)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 05:34:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1380981#M47222</guid>
      <dc:creator>Fastfox</dc:creator>
      <dc:date>2021-12-03T05:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1381133#M47232</link>
      <description>&lt;P&gt;Ok if you are aware of this point.&lt;/P&gt;&lt;P&gt;I would make a trace of of the I2C bus, covering the failing transfer and preverably a few transfers before. And check where exactly the problem happens, and relate it to your (or the SDK) code.&lt;/P&gt;&lt;P&gt;Perhaps experimenting with different (lower) SCL speeds, pull-up resistors, and boards.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 08:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1381133#M47232</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-12-03T08:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1954393#M56858</link>
      <description>&lt;P&gt;Did you finally resolve this issue?&lt;/P&gt;&lt;P&gt;I'm asking as I think &lt;A href="https://community.nxp.com/t5/LPC-Microcontrollers/LPC5526-I2C-stuck-after-SCL-pulled-low-briefly/m-p/1954390" target="_self"&gt;I see the same effect&lt;/A&gt; when I force SCL low for even a very short amount of time. Unplugging and reconnecting an I2C device to the I2C bus creates enough noise that the CPU and my saleae logic analyzer see a short low pulse on SCL. That is enough to "break" the I2C system in my LPC5526.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 16:16:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1954393#M56858</guid>
      <dc:creator>danielholala</dc:creator>
      <dc:date>2024-09-13T16:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: LPC55S69 I2C stuck after SCK disconnect/connect</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1954883#M56868</link>
      <description>&lt;P&gt;I did not resolve this. But since I could not reproduce the problem with real HW where you can not disconnect SCK we decided that we can live with that.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 05:13:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC55S69-I2C-stuck-after-SCK-disconnect-connect/m-p/1954883#M56868</guid>
      <dc:creator>Fastfox</dc:creator>
      <dc:date>2024-09-16T05:13:19Z</dc:date>
    </item>
  </channel>
</rss>

