<?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>S32KのトピックRe: S32K I2C Restore</title>
    <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906581#M4631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The LPI2C module does not have any command that could be used.&lt;/P&gt;&lt;P&gt;And the LPI2C SDK driver does not control GPIOs.&lt;/P&gt;&lt;P&gt;The I2C pins are&amp;nbsp;configured separately by the PIN driver.&lt;/P&gt;&lt;P&gt;If needed, the restore function can be implemented in the user code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2019 13:52:38 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2019-04-25T13:52:38Z</dc:date>
    <item>
      <title>S32K I2C Restore</title>
      <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906580#M4630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to known if&amp;nbsp;a "Restore" can be produce by one of the I2C controller command ?&lt;/P&gt;&lt;P&gt;I refer&amp;nbsp;to "AN4803" document and I2C_Restore() function.&amp;nbsp;A "Start - Receive wDiscard - Stop" is not clocking the I2C bus. If&amp;nbsp;its needed, it would be nice to have it in the SDK kit.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2019 18:46:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906580#M4630</guid>
      <dc:creator>guys_fr</dc:creator>
      <dc:date>2019-04-23T18:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: S32K I2C Restore</title>
      <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906581#M4631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The LPI2C module does not have any command that could be used.&lt;/P&gt;&lt;P&gt;And the LPI2C SDK driver does not control GPIOs.&lt;/P&gt;&lt;P&gt;The I2C pins are&amp;nbsp;configured separately by the PIN driver.&lt;/P&gt;&lt;P&gt;If needed, the restore function can be implemented in the user code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 13:52:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906581#M4631</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-04-25T13:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: S32K I2C Restore</title>
      <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906582#M4632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using DEBUG and break point, I easily ends up with SDA line lock down. The BBF bit stays to one forever. Its really not GPIO driver driven but it work and it unlock the I2C bus.I understand from your answer that the controller can't be force to "clock" the SCL line. I agree with the "user code" part but the driver need to be interrogated and&amp;nbsp;return something like "I can't solve this one?".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SDA_PIN_1 PTA-&amp;gt; PSOR |= 0x00000004&lt;BR /&gt;#define I2C_MASTER_SDA_PIN_0 PTA-&amp;gt; PCOR |= 0x00000004&lt;BR /&gt;#define I2C_MASTER_SCL_PIN_1 PTA-&amp;gt; PSOR |= 0x00000008&lt;BR /&gt;#define I2C_MASTER_SCL_PIN_0 PTA-&amp;gt; PCOR |= 0x00000008&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SDA_PIN_AS_IN (PTA-&amp;gt; PDDR = (PTA-&amp;gt; PDDR &amp;amp;(~(1U &amp;lt;&amp;lt; 2))) | (0 &amp;lt;&amp;lt; 2))&lt;BR /&gt;#define I2C_MASTER_SDA_PIN_AS_OUT (PTA-&amp;gt; PDDR = (PTA-&amp;gt; PDDR &amp;amp;(~(1U &amp;lt;&amp;lt; 2))) | (1 &amp;lt;&amp;lt; 2))&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SCL_PIN_AS_IN (PTA-&amp;gt; PDDR = (PTA-&amp;gt; PDDR &amp;amp;(~(1U &amp;lt;&amp;lt; 3))) | (0 &amp;lt;&amp;lt; 3))&lt;BR /&gt;#define I2C_MASTER_SCL_PIN_AS_OUT (PTA-&amp;gt; PDDR = (PTA-&amp;gt; PDDR &amp;amp;(~(1U &amp;lt;&amp;lt; 3))) | (1 &amp;lt;&amp;lt; 3))&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SDA_PIN_AS_GPIO PORTA-&amp;gt; PCR[2] = (PORTA-&amp;gt; PCR[2] &amp;amp;(~(PORT_PCR_MUX_MASK))) | PORT_PCR_MUX(PORT_MUX_AS_GPIO)&lt;BR /&gt;#define I2C_MASTER_SCL_PIN_AS_GPIO PORTA-&amp;gt; PCR[3] = (PORTA-&amp;gt; PCR[3] &amp;amp;(~(PORT_PCR_MUX_MASK))) | PORT_PCR_MUX(PORT_MUX_AS_GPIO)&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SDA_PIN_AS_I2C PORTA-&amp;gt; PCR[2] = (PORTA-&amp;gt; PCR[2] &amp;amp;(~(PORT_PCR_MUX_MASK))) | PORT_PCR_MUX(PORT_MUX_ALT3)&lt;BR /&gt;#define I2C_MASTER_SCL_PIN_AS_I2C PORTA-&amp;gt; PCR[3] = (PORTA-&amp;gt; PCR[3] &amp;amp;(~(PORT_PCR_MUX_MASK))) | PORT_PCR_MUX(PORT_MUX_ALT3)&lt;/P&gt;&lt;P&gt;#define I2C_MASTER_SDA_PIN_STATE (PTA-&amp;gt; PDIR &amp;amp;(1U &amp;lt;&amp;lt; 2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do&amp;nbsp;add this on all my I2C implementation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2019 14:13:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906582#M4632</guid>
      <dc:creator>guys_fr</dc:creator>
      <dc:date>2019-04-25T14:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: S32K I2C Restore</title>
      <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906583#M4633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guy,&lt;/P&gt;&lt;P&gt;Do you mean that the LPI2C driver should return something like "I can't solve this one?"&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are these error status codes:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70495iA8A1397A87597F50/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You could check the SDA pin with&amp;nbsp;Port Data Input Register (PDIR)&amp;nbsp;when BUS_BUSY is returned.&lt;/P&gt;&lt;P&gt;And if SDA stays low, use the restore function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The LPI2C module&amp;nbsp;supports configurable pin-stuck-low timeout. But this is not implemented in the LPI2C SDK driver.&lt;/P&gt;&lt;P&gt;This is complicated as the PLTF flag cannot be cleared as long as the pin low condition is present.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70409i60B20DCD93A69EF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2019 13:50:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906583#M4633</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-04-29T13:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: S32K I2C Restore</title>
      <link>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906584#M4634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this error is used by the "FLEXIO_I2C_DRV_MasterStartTransfer" but I am using the other driver. I will&amp;nbsp;review the error in functions / IRQ. It will be a better way of handling it. Short term, I added a function that return the MSR / bus status that I process in IDLE. I try to restore/recover as an error correction on the I2C bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will review the PLTF flag, I didn't get a PinLow condition yet, I notice that interrupt are more level&amp;nbsp;than edges in the I2C&amp;nbsp;controller which produce "oups".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Guy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2019 14:41:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32K-I2C-Restore/m-p/906584#M4634</guid>
      <dc:creator>guys_fr</dc:creator>
      <dc:date>2019-04-29T14:41:47Z</dc:date>
    </item>
  </channel>
</rss>

