<?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 MQX4.1.1 I2C example program ran into problem，need help. in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351459#M11385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the example program for I2C located in &amp;lt;install_dir&amp;gt;\Freescale\Freescale_MQX_4_1\mqx\examples\i2c,I found the program stop at "result = fwrite (mem, 1, 1, fd);"&lt;/P&gt;&lt;P&gt;The E2PROM type is 24C02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14253647967656290 jive_macro_code" jivemacro_uid="_14253647967656290" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; mem[0] = (uint8_t)addr;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; printf ("&amp;nbsp; Write to address 0x%02x ... ", mem[0]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = fwrite (mem, 1, 1, fd);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\r\n Hello World \r\n");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; } while (result &amp;lt; 1)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need help,thks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2015 06:41:04 GMT</pubDate>
    <dc:creator>tongjianwu</dc:creator>
    <dc:date>2015-03-03T06:41:04Z</dc:date>
    <item>
      <title>MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351459#M11385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the example program for I2C located in &amp;lt;install_dir&amp;gt;\Freescale\Freescale_MQX_4_1\mqx\examples\i2c,I found the program stop at "result = fwrite (mem, 1, 1, fd);"&lt;/P&gt;&lt;P&gt;The E2PROM type is 24C02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14253647967656290 jive_macro_code" jivemacro_uid="_14253647967656290" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; mem[0] = (uint8_t)addr;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; printf ("&amp;nbsp; Write to address 0x%02x ... ", mem[0]);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = fwrite (mem, 1, 1, fd);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\r\n Hello World \r\n");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; } while (result &amp;lt; 1)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need help,thks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 06:41:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351459#M11385</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-03T06:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351460#M11386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;I&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;see problems&lt;/SPAN&gt; that &lt;SPAN class="hps"&gt;the driver&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;hangs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="hps"&gt;I think it's&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;easiest to&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;modify&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;polled&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;version&lt;/SPAN&gt;.&lt;BR /&gt;&lt;SPAN class="hps"&gt;The drivers&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;in&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;MQX&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;are no specific&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;stable or&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;well written.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;Best regards Poul-Erik.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 09:24:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351460#M11386</guid>
      <dc:creator>poul-erikhansen</dc:creator>
      <dc:date>2015-03-03T09:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351461#M11387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so what should I do for this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; before that, I test the I2C driver for ACCELEROMETER, the program run normally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; after that I test the program for my specific E2PROM,I ran into problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 09:35:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351461#M11387</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-03T09:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351462#M11388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What we have seen is long time stability problems. We use a 24C128 + some IO port expanders, and it works most of the time. I You can't get it working for the first time, You shod use a logic analyzer or a osciloscop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:11:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351462#M11388</guid>
      <dc:creator>poul-erikhansen</dc:creator>
      <dc:date>2015-03-03T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351463#M11389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just now,I test the program for at24c02 and find that " I2C start, send address and get ack ... OK ... ack ==1".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ACK ought to be '0',now I get ACK=1, I think this is the problem here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:41:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351463#M11389</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-03T13:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351464#M11390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tong, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you are right, please check the below thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="2023" data-containertype="14" data-content-finding="Community" data-objectid="100256" data-objecttype="102" href="https://community.nxp.com/docs/DOC-100256"&gt;[MQX 4.1]I2C demo for MMA8451Q&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt; Sol &lt;BR /&gt; &lt;BR /&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>Tue, 03 Mar 2015 21:01:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351464#M11390</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2015-03-03T21:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351465#M11391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Poul-Erik.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Can you offer me the E2PROM Demo code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 03:21:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351465#M11391</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-04T03:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351466#M11392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,soledad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have seen the code for ACCELEROMETER and used for TWR_K70F120M,the program run normally,when I use it for E2PROM,there is NACK for sending slave device address byte.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I use external E2PROM connected to&amp;nbsp; TWR_K70F120M's I2C0 channel for testing,I don't know why this happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regard!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 03:32:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351466#M11392</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-04T03:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: MQX4.1.1 I2C example program ran into problem，need help.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351467#M11393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello every one ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have made a mistake,the I2C device address in MQX should be below format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for example, AT24C02, addr = 1 0 1 0 A2 A1 A0 R/W，this should be shift right one bit (addr&amp;gt;&amp;gt;1),then this parameter pass to MQX I2C driver .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thks !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 06:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX4-1-1-I2C-example-program-ran-into-problem-need-help/m-p/351467#M11393</guid>
      <dc:creator>tongjianwu</dc:creator>
      <dc:date>2015-03-05T06:18:12Z</dc:date>
    </item>
  </channel>
</rss>

