<?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: TWR-K65F180M I2C Send/Receive Not Working in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477733#M4045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: It seems I can read '0xff' from i2c using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2C_DRV_MasterReceiveData(i2cCom1_IDX, &amp;amp;i2cCom1_MasterConfig0, NULL, 0, data, sizeof(data));&lt;/P&gt;&lt;P&gt;while (I2C_DRV_MasterGetReceiveStatus(i2cCom1_IDX, NULL) != kStatus_I2C_Success) {}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I specify a cmd arg/len in place of "NULL, 0", the operation hangs on the while loop. Standard I2C writes also fail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Dec 2015 02:00:02 GMT</pubDate>
    <dc:creator>savoca</dc:creator>
    <dc:date>2015-12-11T02:00:02Z</dc:date>
    <item>
      <title>TWR-K65F180M I2C Send/Receive Not Working</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477732#M4044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a TWR-K65F180M board and trying to communicate with an MPU I've attached to PTE18/PTE19 SDA/SCK. Whenever I run:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;I2C_DRV_MasterSendData(i2cCom1_IDX, &amp;amp;i2cCom1_MasterConfig0, NULL, 0, wrBuf, &lt;SPAN class="s1"&gt;sizeof&lt;/SPAN&gt;(wrBuf));&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;or&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;I2C_DRV_MasterReceiveData(i2cCom1_IDX, &amp;amp;i2cCom1_MasterConfig0, NULL, 0, rdBuf, sizeof(rdBuf));&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;I get a return of kStatus_I2C_Success, however the buffer is always empty when data is normally expected.&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Under linux my driver works perfectly for this chip, using standard I2C API:&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;uint8_t buf[8];&lt;/P&gt;&lt;P class="p1"&gt;struct i2c_msg msg[] = {&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .addr = client-&amp;gt;addr,&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .flags = I2C_M_RD,&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .len = sizeof(buf),&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .buf = buf,&lt;/P&gt;&lt;P class="p1"&gt;};&lt;/P&gt;&lt;P class="p1"&gt;i2c_transfer(client-&amp;gt;adapter, msg, 1);&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Also, calls like this loop forever:&lt;/P&gt;&lt;P class="p1"&gt;I2C_DRV_MasterGetSendStatus(i2cCom1_IDX, NULL);&lt;/P&gt;&lt;P class="p1"&gt;I2C_DRV_MasterGetReceiveStatus(i2cCom1_IDX, NULL);&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Additionally, I can't seem to communicate with the internal accelerometer either, using similar methods.&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;KDS 3.0.0 / PE 3.0.1 / KSDK 1.3.0&lt;/P&gt;&lt;P class="p1" style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;There doesn't seem to be any documentation on how I should be setting this up, not that I'm asking to have my hand held here or anything... But if there's something here I'm missing please help so I can use the Freescale platform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 00:29:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477732#M4044</guid>
      <dc:creator>savoca</dc:creator>
      <dc:date>2015-12-11T00:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K65F180M I2C Send/Receive Not Working</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477733#M4045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: It seems I can read '0xff' from i2c using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I2C_DRV_MasterReceiveData(i2cCom1_IDX, &amp;amp;i2cCom1_MasterConfig0, NULL, 0, data, sizeof(data));&lt;/P&gt;&lt;P&gt;while (I2C_DRV_MasterGetReceiveStatus(i2cCom1_IDX, NULL) != kStatus_I2C_Success) {}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I specify a cmd arg/len in place of "NULL, 0", the operation hangs on the while loop. Standard I2C writes also fail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 02:00:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477733#M4045</guid>
      <dc:creator>savoca</dc:creator>
      <dc:date>2015-12-11T02:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: TWR-K65F180M I2C Send/Receive Not Working</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477734#M4046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex Deddo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please confirm if you have enabled the Open Drain setting for the I2C pins (PTE18/PTE19). See my latest reply at the next discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/594480"&gt;Re: I2C on KDS and configuring the component&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is not the cause please share your test project so I can give it a try from my side and find what is wrong.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards!,&lt;BR /&gt;Jorge Gonzalez&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>Sun, 13 Dec 2015 04:21:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/TWR-K65F180M-I2C-Send-Receive-Not-Working/m-p/477734#M4046</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-12-13T04:21:33Z</dc:date>
    </item>
  </channel>
</rss>

