<?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: i2c interface with K65 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/i2c-interface-with-K65/m-p/508591#M32016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annamol:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX support the I2C interface in both master and slave mode. If enabled in user configuration, the I2C driver is installed during the BSP startup code as the "i2cx" in polled mode and as the "ii2x" in interrupt mode where "x" stands for a specified I2C channel number. Example applications are provided in the MQX RTOS source tree for both master and slave mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\mqx\examples\i2c&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\mqx\examples\i2c_slave&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;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2016 05:22:02 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2016-04-21T05:22:02Z</dc:date>
    <item>
      <title>i2c interface with K65</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/i2c-interface-with-K65/m-p/508590#M32015</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 am trying to interface AFE4404 with K65 and K53. The slave is getting powered and the clock is also there. AFE4404 registers are 24 bit. So I did the following change to write the data onto registers. I can see the content getting updated in I2C1_D register. I am working with MQX and bare metal code to get the interface up and running.But no luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void MMA7660WriteRegister(unsigned char u8RegisterAddress, uint32_t u8Data1)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t u8Data =0x000200;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* send data to slave */&lt;/P&gt;&lt;P&gt;&amp;nbsp; IIC_StartTransmission(0x58,MWSR);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Wait();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C1_D = u8RegisterAddress;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Wait();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C1_D = (u8Data &amp;amp; 0xFF0000)&amp;gt;&amp;gt;16;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Wait();&lt;/P&gt;&lt;P&gt;//&amp;nbsp; i2c_Stop();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C1_D = (u8Data&amp;amp;0x00FF00)&amp;gt;&amp;gt;8;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Wait();&lt;/P&gt;&lt;P&gt;//&amp;nbsp; i2c_Stop();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; I2C1_D = (u8Data &amp;amp; 0x0000ff);&lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Wait();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; i2c_Stop();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Pause();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when probing with a logic analyzer I can see only S and P pulses and nothing more.&lt;/P&gt;&lt;P&gt;Any idea on why this happens?&lt;/P&gt;&lt;P&gt;Is there any stable working code in MQX to interface I2C peripheral? The example projects gets locked up. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 13:09:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/i2c-interface-with-K65/m-p/508590#M32015</guid>
      <dc:creator>annamol</dc:creator>
      <dc:date>2016-04-15T13:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: i2c interface with K65</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/i2c-interface-with-K65/m-p/508591#M32016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Annamol:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX support the I2C interface in both master and slave mode. If enabled in user configuration, the I2C driver is installed during the BSP startup code as the "i2cx" in polled mode and as the "ii2x" in interrupt mode where "x" stands for a specified I2C channel number. Example applications are provided in the MQX RTOS source tree for both master and slave mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\mqx\examples\i2c&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\mqx\examples\i2c_slave&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;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 05:22:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/i2c-interface-with-K65/m-p/508591#M32016</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-04-21T05:22:02Z</dc:date>
    </item>
  </channel>
</rss>

