<?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: K60 I2C-EEPROM write and read in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310588#M842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add that as I stated in my last post above, I could write and read but I cannot write and read in sequence. Is there such a rule for I2C EEPROMs to write and read separately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 16:16:15 GMT</pubDate>
    <dc:creator>mehdikarimibiuk</dc:creator>
    <dc:date>2014-05-12T16:16:15Z</dc:date>
    <item>
      <title>K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310579#M833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have MK60DN512VLL10 that has its I2C1 connected to EEPROM (&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fpdf.datasheetcatalog.com%2Fdatasheets2%2F46%2F465195_1.pdf" rel="nofollow" target="_blank"&gt;ST Microelectronics - datasheet pdf&lt;/A&gt;) M24256-BWDW6&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I removed the pull up on WC signal above.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;following the above write sequence in my application I have:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then based on the read sequence:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My read looks like:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this returns me 0xff (printf result is 0xff 0x0 0x0 0x0 0x0), that means either I did not write or I cannot read?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see from the above code snippets, my I2C1 is interrupt based:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me what is wrong? And why I cannot write/read EEPROM?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mehdi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 03:30:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310579#M833</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-05-06T03:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310580#M834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi @Jorge_Gonzalez&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please give me an example based on the EEPROM read/write format above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on Figure8 and Figure9 that I showed above, would the following work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint8 buffer[4];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;buffer[0] = 0x57 //address of the slave &lt;/P&gt;&lt;P&gt;buffer[1] = 0x00 // first byte address&lt;/P&gt;&lt;P&gt;buffer[2] = 0x00 //second byte address&lt;/P&gt;&lt;P&gt;buffer[3] = 0x55 // one byte data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2C1_SelectSlaveDevice(I2C1ptr, LDD_I2C_ADDRTYPE_7BITS, passin[0]);&lt;/P&gt;&lt;P&gt;Sent = 0;&lt;/P&gt;&lt;P&gt;I2C1_MasterSendBlock(I2C1ptr, passin , sizeof(passin), LDD_I2C_SEND_STOP); //LDD_I2C_SEND_STOP LDD_I2C_NO_SEND_STOP&lt;/P&gt;&lt;P&gt;while (Sent == 0){}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this and it did not work. Do you have any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 16:45:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310580#M834</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-05-09T16:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310581#M835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Medhi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each call to MasterSendBlock() generates a new start signal together with the address, as you see in your scope.&lt;/P&gt;&lt;P&gt;To avoid this try placing together all your data. If you look at Figure 8 above, you may use a unique buffer with [Byte addr + Byte addr + Data in] in the same buffer.&lt;/P&gt;&lt;P&gt;As reference here you have some code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint8&amp;nbsp; pass_buff[3];&lt;/P&gt;&lt;P&gt;uint8&amp;nbsp; passin;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass_buff[0] = 0x00;&lt;/P&gt;&lt;P&gt;pass_buff[1] = 0x00;&lt;/P&gt;&lt;P&gt;pass_buff[2] = 0x55;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;passin = 0x57;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2C_SelectSlaveDevice(I2C1ptr, LDD_I2C_ADDRTYPE_7BITS, passin);&lt;/P&gt;&lt;P&gt;Sent = 0;&lt;/P&gt;&lt;P&gt;I2C1_MasterSendBlock(I2C1ptr, &amp;amp;pass_buff , sizeof(pass_buff), LDD_I2C_SEND_STOP);&lt;/P&gt;&lt;P&gt;while (Sent == 0){}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 17:10:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310581#M835</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-05-09T17:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310582#M836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code seems OK to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the bus with your scope to verify the activity.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 17:27:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310582#M836</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-05-09T17:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310583#M837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The whole transmission frame is complete according to your scope. Then we need to track down the problem with the debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can start by setting a breakpoint inside of the OnMasterBlockSent(), just to confirm that it never reaches that line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next step is to analyze the code in the interrupt routine PE_ISR(I2C1_Interrupt). I know it is a lot of code, but the problem resides in there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 17:39:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310583#M837</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-05-09T17:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310584#M838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;n/a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 19:01:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310584#M838</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-05-09T19:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310585#M839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that should be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in your last code there are 3 while loops, if I understood correctly you can already passed the first one and now you are stuck in the second while loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not know what is the cause, but again it would be helpful to check it with the scope.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 19:34:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310585#M839</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2014-05-09T19:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310586#M840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I checked it with scope. Here is what's happening, I cannot do write and read in sequence but I can do them separately. I don't know why? Do you have any idea why?&lt;/P&gt;&lt;P&gt;I wrote to address 0x0000 first time. I wrote the value 0x55. So my 0x55 stored at address zero of my eeprom. I removed write and do the read of that byte. When I do that I can read 0x55 back, which means it wrote to that address and stores it there coreclty.&lt;/P&gt;&lt;P&gt;But do you have any idea why I cannot do this in sequence and it get stuck in the while loop for read?&lt;/P&gt;&lt;P&gt;Here is my latest code:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 19:45:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310586#M840</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-05-09T19:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310587#M841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Medhi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem has been handle through Service Request process.&lt;/P&gt;&lt;P&gt;The SR is 1-1342499221&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pascal&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>Mon, 12 May 2014 11:57:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310587#M841</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-05-12T11:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310588#M842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add that as I stated in my last post above, I could write and read but I cannot write and read in sequence. Is there such a rule for I2C EEPROMs to write and read separately?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 16:16:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310588#M842</guid>
      <dc:creator>mehdikarimibiuk</dc:creator>
      <dc:date>2014-05-12T16:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310589#M843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehdi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the feedback and survey.&lt;/P&gt;&lt;P&gt;I shared this information with Processor Expert team and development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal&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>Tue, 13 May 2014 08:22:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310589#M843</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-05-13T08:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: K60 I2C-EEPROM write and read</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310590#M844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mehdi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I received feedback for Proceesor Exper team which could explain the EEPROM behavior.&lt;/P&gt;&lt;P&gt;See below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44107i4E6A6D422C47FA04/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.jpg" alt="pastedImage_0.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is a feature of the EEPROM device.&lt;/P&gt;&lt;P&gt;Write cycle takes up to 5ms.&lt;/P&gt;&lt;P&gt;It is not responsibility of I2C bus protocol in general.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pascal&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, 16 May 2014 07:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/K60-I2C-EEPROM-write-and-read/m-p/310590#M844</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-05-16T07:32:49Z</dc:date>
    </item>
  </channel>
</rss>

