<?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>LPC MicrocontrollersのトピックLPCOpen bug : Chip_I2CM_XferHandler()</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCOpen-bug-Chip-I2CM-XferHandler/m-p/581895#M20548</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by pierre on Tue Oct 14 00:49:45 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is for LPC4330 and related.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_I2CM_XferHandler() contains a switch/case reacting to the I2C hardware state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes it reports an "error" and aborts mid-transaction, but does not reset the hardware, so the next I2C transaction gets stuck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact there is no error. The hardware sometimes sends status code 0xF8 to the IRQ and the manual specifically states that it should be ignored, while LPCOpen treats it as an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To fix it, please add this case in the switch :&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* FIX : STAT = 0xF8
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This status code indicates that no relevant information is available because the serial
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interrupt flag, SI, is not yet set. This occurs between other states and when the I2C block
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is not involved in a serial transfer.

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function should do nothing at all, modify no registers, and simply return.
*/
case 0xF8:
return 0;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a nice day !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:24:21 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:24:21Z</dc:date>
    <item>
      <title>LPCOpen bug : Chip_I2CM_XferHandler()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCOpen-bug-Chip-I2CM-XferHandler/m-p/581895#M20548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by pierre on Tue Oct 14 00:49:45 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This is for LPC4330 and related.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_I2CM_XferHandler() contains a switch/case reacting to the I2C hardware state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes it reports an "error" and aborts mid-transaction, but does not reset the hardware, so the next I2C transaction gets stuck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact there is no error. The hardware sometimes sends status code 0xF8 to the IRQ and the manual specifically states that it should be ignored, while LPCOpen treats it as an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To fix it, please add this case in the switch :&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* FIX : STAT = 0xF8
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This status code indicates that no relevant information is available because the serial
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; interrupt flag, SI, is not yet set. This occurs between other states and when the I2C block
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is not involved in a serial transfer.

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This function should do nothing at all, modify no registers, and simply return.
*/
case 0xF8:
return 0;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a nice day !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCOpen-bug-Chip-I2CM-XferHandler/m-p/581895#M20548</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:24:21Z</dc:date>
    </item>
  </channel>
</rss>

