<?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>Kinetis Software Development KitのトピックKSDK I2C Slave Driver Issue - Slave I2C driver is not detecting the stop condition properly when repeated start is sent by the master</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-I2C-Slave-Driver-Issue-Slave-I2C-driver-is-not-detecting/m-p/836442#M7897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is an issue exists in KSDK 2.0 I2C slave driver when master sends repeated start I2C slave driver fails to detect the stop condition and also event "kI2C_SlaveCompletionEvent" is generated in the callback function when stop is detected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stop detection is failing when Random read condition sent by master. See the picture Random Read&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_12.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74686iA00C6D055068528E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After looking closely in to I2C_SlaveTransferHandleIRQ() function, i found a bug in the code which fails to detect in stop condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Bug:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;handle-&amp;gt;isBusy is set to false when NAK is sent by master after reading data from slave. This flag is checked in stop dection before calling callback function. Since this flag is already cleared when NAK is received, it is not calling the callback function with the event 'kI2C_SlaveCompletionEvent'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Work around: &lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Clear the handle-&amp;gt;isBusy only if stop condition is detected. Here is the code snippet with the commented the flag .&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File: fsl_i2c.c&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74590i26F395CE0452F438/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2018 06:12:01 GMT</pubDate>
    <dc:creator>ashok_gaddam</dc:creator>
    <dc:date>2018-10-09T06:12:01Z</dc:date>
    <item>
      <title>KSDK I2C Slave Driver Issue - Slave I2C driver is not detecting the stop condition properly when repeated start is sent by the master</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-I2C-Slave-Driver-Issue-Slave-I2C-driver-is-not-detecting/m-p/836442#M7897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There is an issue exists in KSDK 2.0 I2C slave driver when master sends repeated start I2C slave driver fails to detect the stop condition and also event "kI2C_SlaveCompletionEvent" is generated in the callback function when stop is detected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stop detection is failing when Random read condition sent by master. See the picture Random Read&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_12.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74686iA00C6D055068528E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After looking closely in to I2C_SlaveTransferHandleIRQ() function, i found a bug in the code which fails to detect in stop condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Bug:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;handle-&amp;gt;isBusy is set to false when NAK is sent by master after reading data from slave. This flag is checked in stop dection before calling callback function. Since this flag is already cleared when NAK is received, it is not calling the callback function with the event 'kI2C_SlaveCompletionEvent'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Work around: &lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Clear the handle-&amp;gt;isBusy only if stop condition is detected. Here is the code snippet with the commented the flag .&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File: fsl_i2c.c&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74590i26F395CE0452F438/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 06:12:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-I2C-Slave-Driver-Issue-Slave-I2C-driver-is-not-detecting/m-p/836442#M7897</guid>
      <dc:creator>ashok_gaddam</dc:creator>
      <dc:date>2018-10-09T06:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK I2C Slave Driver Issue - Slave I2C driver is not detecting the stop condition properly when repeated start is sent by the master</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-I2C-Slave-Driver-Issue-Slave-I2C-driver-is-not-detecting/m-p/836443#M7898</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 had checked our internal JIRA bug processing system, and do not find this issue reported. Anyway, I will double check the issue and let you know the result. Thanks for your information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 05:30:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-I2C-Slave-Driver-Issue-Slave-I2C-driver-is-not-detecting/m-p/836443#M7898</guid>
      <dc:creator>miduo</dc:creator>
      <dc:date>2018-10-12T05:30:39Z</dc:date>
    </item>
  </channel>
</rss>

