<?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: i2c0 reading wrong data in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407130#M2822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have check the datasheet of MAG3310 , the data of 0X1D is the read address , so are you sue you checked the data is the register of "Who am i" ?&lt;/P&gt;&lt;P&gt;And&amp;nbsp; i fund in you IIC file , there is a function of " I2C_MasterReadWait()" , if use this function , what about the result ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Oct 2015 12:42:22 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2015-10-21T12:42:22Z</dc:date>
    <item>
      <title>i2c0 reading wrong data</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407127#M2819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am trying to interface KEA128 with accelerometer(MMA8451) or magneto meter (MAG3310) am having trouble reading who am i register getting wrong values have attached the project below using code warrior.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338562"&gt;file.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2015 06:07:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407127#M2819</guid>
      <dc:creator>bharadwaaj</dc:creator>
      <dc:date>2015-10-17T06:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: i2c0 reading wrong data</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407128#M2820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bharadwaaj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you pleas describe the the problem In detail , that can find the problem faster .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2015 02:04:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407128#M2820</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-10-19T02:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: i2c0 reading wrong data</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407129#M2821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi with the below code we are trying to read the Who am i register of MAG3310&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;(slave address is: 0x0e) I am trying to read the who am i register (reg address is: 0x07).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I am supposed to read 0xC4 but am getting 0x1D. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;uint8_t I2C_MasterRegisterReadWait(I2C_Type *pI2Cx,uint8_t u8SlaveAddress, uint8_t u8RegisterAddress,uint8_t *pRdBuff)&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;{&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t u8ErrorStatus=0;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send start signals to bus */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_Start(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send device address to slave */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8SlaveAddress&amp;lt;&amp;lt;1) | I2C_WRITE);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8RegisterAddress) );&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_RepeatStart(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8SlaveAddress&amp;lt;&amp;lt;1) | I2C_READ);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* if no error occur, received the correct ack from slave&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue to send data to slave&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* dummy read one byte to switch to Rx mode */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I2C_ReadOneByte(pI2Cx,&amp;amp;pRdBuff[0],I2C_SEND_NACK);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send stop signals to bus */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_Stop(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 06:40:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407129#M2821</guid>
      <dc:creator>bharadwaaj</dc:creator>
      <dc:date>2015-10-21T06:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: i2c0 reading wrong data</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407130#M2822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have check the datasheet of MAG3310 , the data of 0X1D is the read address , so are you sue you checked the data is the register of "Who am i" ?&lt;/P&gt;&lt;P&gt;And&amp;nbsp; i fund in you IIC file , there is a function of " I2C_MasterReadWait()" , if use this function , what about the result ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 12:42:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407130#M2822</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2015-10-21T12:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: i2c0 reading wrong data</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407131#M2823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i forgot to add the dummy read thats why it was giving random values if we read from the bus now i have changed my code in order to make dummy read and then read now it works fine.... This above code is not from iic driver file. I have written this register read functionality in order to read from register....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;uint8_t I2C_MasterRegisterReadWait(I2C_Type *pI2Cx,uint8_t u8SlaveAddress, uint8_t u8RegisterAddress,uint8_t *pRdBuff)&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;{&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t u8ErrorStatus=0;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send start signals to bus */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_Start(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send device address to slave */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8SlaveAddress&amp;lt;&amp;lt;1) | I2C_WRITE);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8RegisterAddress) );&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_RepeatStart(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_WriteOneByte(pI2Cx,((uint8_t)u8SlaveAddress&amp;lt;&amp;lt;1) | I2C_READ);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* if no error occur, received the correct ack from slave&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue to send data to slave&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* dummy read one byte to switch to Rx mode */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_ReadOneByte(pI2Cx,&amp;amp;pRdBuff[0],I2C_SEND_NACK);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_ReadOneByte(pI2Cx,&amp;amp;pRdBuff[0],I2C_SEND_NACK);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( u8ErrorStatus != I2C_ERROR_NULL )&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* send stop signals to bus */&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u8ErrorStatus = I2C_Stop(pI2Cx);&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return u8ErrorStatus;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: 12.8000001907349px;"&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2015 07:12:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/i2c0-reading-wrong-data/m-p/407131#M2823</guid>
      <dc:creator>bharadwaaj</dc:creator>
      <dc:date>2015-10-22T07:12:59Z</dc:date>
    </item>
  </channel>
</rss>

