<?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>Kinetis MicrocontrollersのトピックRe: MKE02Z I2C0 issue</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588327#M34622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use the TCF or IICIF flag to wait for transmission and then the RXAK only to check whether a slave responded or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possibly the RXAK flag is meaningless during transmission and so only set in an error case, which would cause your loop to immediately quit when run at normal speed (and something later abort transmission).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IICIF operation with interrupts would be generally more efficient, whereby KE02 code is identical to code for all KL and K parts (except newer double-buffered I2C controller types).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Sep 2016 22:28:48 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2016-09-02T22:28:48Z</dc:date>
    <item>
      <title>MKE02Z I2C0 issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588326#M34621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having an issue with the I2C module. &amp;nbsp;I am writing to an LCD controller chip that uses I2C.&lt;/P&gt;&lt;P&gt;If I step through my code, I can see all bytes being pumped out and the LCD controller chip is&amp;nbsp;&lt;/P&gt;&lt;P&gt;ACKing my bytes properly. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The minute I let the software run, bytes don't appear on my scope,nor do I see the numbers I&amp;nbsp;&lt;/P&gt;&lt;P&gt;am pumping out to the LCD?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel there is an issue with my I2C STATUS wait. &amp;nbsp;Here is the code for &amp;nbsp;the STATUS wait:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2C0_D = ucData; //Write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Make sure we Arbitration is not lost 1=Lost 0=Standard bus operation&lt;BR /&gt; if ((I2C0_S &amp;amp; I2C_S_ARBL_MASK) == 0)&lt;BR /&gt;&amp;nbsp; {//Begin if (Standard Bus Operation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;//Wait until an acknowledge signal is detected&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;while ((I2C0_S &amp;amp; I2C_S_RXAK_MASK) == 1)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (1);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; }//End if (Standard Bus Operation)&lt;BR /&gt; else&lt;BR /&gt;&amp;nbsp; I2C0_S |= I2C_S_ARBL_MASK; //Clear the arbitration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 20:50:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588326#M34621</guid>
      <dc:creator>neilporven</dc:creator>
      <dc:date>2016-09-02T20:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: MKE02Z I2C0 issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588327#M34622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would use the TCF or IICIF flag to wait for transmission and then the RXAK only to check whether a slave responded or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possibly the RXAK flag is meaningless during transmission and so only set in an error case, which would cause your loop to immediately quit when run at normal speed (and something later abort transmission).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IICIF operation with interrupts would be generally more efficient, whereby KE02 code is identical to code for all KL and K parts (except newer double-buffered I2C controller types).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2016 22:28:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588327#M34622</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2016-09-02T22:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: MKE02Z I2C0 issue</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588328#M34623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always thank you! &amp;nbsp;I used the TCF and now it's working, I left the RXAK flag to make&lt;/P&gt;&lt;P&gt;sure the other chip is communicating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 02:23:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MKE02Z-I2C0-issue/m-p/588328#M34623</guid>
      <dc:creator>neilporven</dc:creator>
      <dc:date>2016-09-05T02:23:45Z</dc:date>
    </item>
  </channel>
</rss>

