<?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 I2C Driver, SDK v2.2 not issuing device address in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695370#M7475</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have read through the post "&lt;/P&gt;&lt;H1 style="color: #000000; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 2rem;"&gt;Problem sending I2C message"&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I have a slightly different problem. The device I am talking to requires the device address to be resent (ie readdressed with the Read bit High) after the the initial write of the device address. This is not happening in the device driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;//%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/P&gt;&lt;P&gt;I2C_MasterGetDefaultConfig(&amp;amp;masterConfig);&lt;BR /&gt; masterConfig.baudRate_Bps = I2C_BAUDRATE;&lt;/P&gt;&lt;P&gt;sourceClock = I2C_MASTER_CLK_FREQ;&lt;/P&gt;&lt;P&gt;I2C_MasterInit(I2C0, &amp;amp;masterConfig, sourceClock);&lt;/P&gt;&lt;P&gt;memset(&amp;amp;g_m_handle, 0, sizeof(g_m_handle));&lt;BR /&gt; memset(&amp;amp;masterXfer, 0, sizeof(masterXfer));&lt;/P&gt;&lt;P&gt;masterXfer.slaveAddress = 0x68;&lt;BR /&gt; masterXfer.direction = kI2C_Write;&lt;BR /&gt; masterXfer.subaddress = 0x75;&lt;BR /&gt; masterXfer.subaddressSize = 1;&lt;BR /&gt; masterXfer.data = c_buff;&lt;BR /&gt; masterXfer.dataSize = 1;&lt;BR /&gt; masterXfer.flags = kI2C_TransferNoStopFlag;&lt;/P&gt;&lt;P&gt;I2C_MasterTransferCreateHandle(I2C0, &amp;amp;g_m_handle, i2c_master_callback, NULL);&lt;/P&gt;&lt;P&gt;I2C_MasterTransferNonBlocking(I2C0, &amp;amp;g_m_handle, &amp;amp;masterXfer);&lt;/P&gt;&lt;P&gt;masterXfer.direction = kI2C_Read;&lt;BR /&gt; masterXfer.flags = kI2C_TransferRepeatedStartFlag;&lt;/P&gt;&lt;P&gt;I2C_MasterTransferNonBlocking(I2C0, &amp;amp;g_m_handle, &amp;amp;masterXfer);&lt;/P&gt;&lt;P&gt;/* Wait for transfer completed. */&lt;BR /&gt; while (!g_MasterCompletionFlag){}&lt;BR /&gt; g_MasterCompletionFlag = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/P&gt;&lt;P&gt;The call back is occurring however I get no data back because I haven't issued a read with the device address. Can you tell me how to configure the driver to do this. I have attached a screen shot of&amp;nbsp;a logic analyzer with a working correct driver, versus the SDK v2.2, non working driver results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Sep 2017 21:09:59 GMT</pubDate>
    <dc:creator>Cdn_aye</dc:creator>
    <dc:date>2017-09-29T21:09:59Z</dc:date>
    <item>
      <title>I2C Driver, SDK v2.2 not issuing device address</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695370#M7475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have read through the post "&lt;/P&gt;&lt;H1 style="color: #000000; background-color: #ffffff; border: 0px; font-weight: 200; font-size: 2rem;"&gt;Problem sending I2C message"&lt;/H1&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I have a slightly different problem. The device I am talking to requires the device address to be resent (ie readdressed with the Read bit High) after the the initial write of the device address. This is not happening in the device driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have:&lt;/P&gt;&lt;P&gt;//%%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/P&gt;&lt;P&gt;I2C_MasterGetDefaultConfig(&amp;amp;masterConfig);&lt;BR /&gt; masterConfig.baudRate_Bps = I2C_BAUDRATE;&lt;/P&gt;&lt;P&gt;sourceClock = I2C_MASTER_CLK_FREQ;&lt;/P&gt;&lt;P&gt;I2C_MasterInit(I2C0, &amp;amp;masterConfig, sourceClock);&lt;/P&gt;&lt;P&gt;memset(&amp;amp;g_m_handle, 0, sizeof(g_m_handle));&lt;BR /&gt; memset(&amp;amp;masterXfer, 0, sizeof(masterXfer));&lt;/P&gt;&lt;P&gt;masterXfer.slaveAddress = 0x68;&lt;BR /&gt; masterXfer.direction = kI2C_Write;&lt;BR /&gt; masterXfer.subaddress = 0x75;&lt;BR /&gt; masterXfer.subaddressSize = 1;&lt;BR /&gt; masterXfer.data = c_buff;&lt;BR /&gt; masterXfer.dataSize = 1;&lt;BR /&gt; masterXfer.flags = kI2C_TransferNoStopFlag;&lt;/P&gt;&lt;P&gt;I2C_MasterTransferCreateHandle(I2C0, &amp;amp;g_m_handle, i2c_master_callback, NULL);&lt;/P&gt;&lt;P&gt;I2C_MasterTransferNonBlocking(I2C0, &amp;amp;g_m_handle, &amp;amp;masterXfer);&lt;/P&gt;&lt;P&gt;masterXfer.direction = kI2C_Read;&lt;BR /&gt; masterXfer.flags = kI2C_TransferRepeatedStartFlag;&lt;/P&gt;&lt;P&gt;I2C_MasterTransferNonBlocking(I2C0, &amp;amp;g_m_handle, &amp;amp;masterXfer);&lt;/P&gt;&lt;P&gt;/* Wait for transfer completed. */&lt;BR /&gt; while (!g_MasterCompletionFlag){}&lt;BR /&gt; g_MasterCompletionFlag = false;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//%%%%%%%%%%%%%%%%%%%%%%%%%%%&lt;/P&gt;&lt;P&gt;The call back is occurring however I get no data back because I haven't issued a read with the device address. Can you tell me how to configure the driver to do this. I have attached a screen shot of&amp;nbsp;a logic analyzer with a working correct driver, versus the SDK v2.2, non working driver results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2017 21:09:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695370#M7475</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2017-09-29T21:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Driver, SDK v2.2 not issuing device address</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695371#M7476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;After the initial write transfer, should you be waiting for transfer completion? Otherwise the driver will return&amp;nbsp;&lt;EM style="font-family: arial, helvetica, sans-serif;"&gt;kStatus_I2C_Busy&lt;/EM&gt; on the next transfer(for read), right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Visakhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Oct 2017 05:27:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695371#M7476</guid>
      <dc:creator>visakhanc</dc:creator>
      <dc:date>2017-10-01T05:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Driver, SDK v2.2 not issuing device address</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695372#M7477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Visajhan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the code example from this question "Problem sending I2C message". In that example it was pointed out the the stop call back was failing because of the wrong flag being used. The recommendation was to wait on the transfer completion flag. I implemented the code exactly like this, but maybe I am misunderstanding how this should work. I thought that the read would send the slave address with the write bit as a 0, then get the ACK and send out the slave address with the read bit set as a 1, then receive an ACK and the transfer would be complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you advise me on how to set the flags or to check for the correct status so the slave address is sent prior to the read please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Oct 2017 17:21:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695372#M7477</guid>
      <dc:creator>Cdn_aye</dc:creator>
      <dc:date>2017-10-01T17:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Driver, SDK v2.2 not issuing device address</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695373#M7478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;I have gone through the driver and found that only a single driver call is enough to read from a location of a slave (that is &lt;EM&gt;0x75 &lt;/EM&gt;in your case) into location &lt;EM&gt;c_buff&lt;/EM&gt;. Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;I2C_MasterGetDefaultConfig(&amp;amp;masterConfig);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterConfig.baudRate_Bps = I2C_BAUDRATE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;sourceClock = I2C_MASTER_CLK_FREQ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;I2C_MasterInit(I2C0, &amp;amp;masterConfig, sourceClock);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;memset(&amp;amp;g_m_handle, 0, sizeof(g_m_handle));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;memset(&amp;amp;masterXfer, 0, sizeof(masterXfer));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.slaveAddress = 0x68;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.direction = kI2C_Read;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.subaddress = 0x75;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.subaddressSize = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.data = c_buff;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.dataSize = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;masterXfer.flags = kI2C_TransferDefaultFlag;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;I2C_MasterTransferCreateHandle(I2C0, &amp;amp;g_m_handle, i2c_master_callback, NULL);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;I2C_MasterTransferNonBlocking(I2C0, &amp;amp;g_m_handle, &amp;amp;masterXfer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: 'courier new', courier, monospace;"&gt;/* Wait for transfer completed. */&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: 'courier new', courier, monospace;"&gt;while (!g_MasterCompletionFlag){}&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: 'courier new', courier, monospace;"&gt;g_MasterCompletionFlag = false;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: arial, helvetica, sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; font-family: arial, helvetica, sans-serif;"&gt;Visakhan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Oct 2017 21:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/I2C-Driver-SDK-v2-2-not-issuing-device-address/m-p/695373#M7478</guid>
      <dc:creator>visakhanc</dc:creator>
      <dc:date>2017-10-01T21:07:54Z</dc:date>
    </item>
  </channel>
</rss>

