<?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のトピックI2C Scanner using Processor Expert for S32K146EVB</title>
    <link>https://community.nxp.com/t5/S32K/I2C-Scanner-using-Processor-Expert-for-S32K146EVB/m-p/1886934#M36557</link>
    <description>&lt;P&gt;Hello I am working on I2C Scanner by using S32K146EVB using Processor Expert.&lt;BR /&gt;&lt;BR /&gt;I am able to initialize I2C and while reading the Acknowledge, it is giving a problem.&lt;BR /&gt;&lt;BR /&gt;I have attached my file for your kind reference..&lt;BR /&gt;I hope to hear from you soon..&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188029"&gt;@Senlent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 10:39:33 GMT</pubDate>
    <dc:creator>Nibesh</dc:creator>
    <dc:date>2024-06-13T10:39:33Z</dc:date>
    <item>
      <title>I2C Scanner using Processor Expert for S32K146EVB</title>
      <link>https://community.nxp.com/t5/S32K/I2C-Scanner-using-Processor-Expert-for-S32K146EVB/m-p/1886934#M36557</link>
      <description>&lt;P&gt;Hello I am working on I2C Scanner by using S32K146EVB using Processor Expert.&lt;BR /&gt;&lt;BR /&gt;I am able to initialize I2C and while reading the Acknowledge, it is giving a problem.&lt;BR /&gt;&lt;BR /&gt;I have attached my file for your kind reference..&lt;BR /&gt;I hope to hear from you soon..&lt;BR /&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/201913"&gt;@VaneB&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188029"&gt;@Senlent&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 10:39:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I2C-Scanner-using-Processor-Expert-for-S32K146EVB/m-p/1886934#M36557</guid>
      <dc:creator>Nibesh</dc:creator>
      <dc:date>2024-06-13T10:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: I2C Scanner using Processor Expert for S32K146EVB</title>
      <link>https://community.nxp.com/t5/S32K/I2C-Scanner-using-Processor-Expert-for-S32K146EVB/m-p/1888198#M36627</link>
      <description>&lt;P&gt;Hi Nibesh,&lt;/P&gt;
&lt;P&gt;Sorry for not testing it for you in the previous question &lt;A href="https://community.nxp.com/t5/S32K/I2C-Scanner-using-S32K146EVB-Q144/m-p/1881408" target="_self"&gt;I2C Scanner using S32K146EVB-Q144&lt;/A&gt;. But as I mentioned there, since the &lt;STRONG&gt;LPI2C_init&lt;/STRONG&gt; of &lt;STRONG&gt;S32K146_Project_LPI2C&lt;/STRONG&gt; configure &lt;SPAN&gt;MCFGR1[&lt;/SPAN&gt;&lt;STRONG&gt;IGNACK&lt;/STRONG&gt;] to Ignore NACK&amp;nbsp;by default, and its &lt;STRONG&gt;LPI2C_Transmit&lt;/STRONG&gt; uses MTDR[&lt;STRONG&gt;CMD&lt;/STRONG&gt;]=&lt;STRONG&gt;5&lt;/STRONG&gt; by default:&lt;EM&gt;101b&amp;nbsp; Generate (repeated) START and transmit address in DATA[7:0]. This transfer expects a NACK to be returned.&lt;/EM&gt;&lt;BR /&gt;So you can't judge the acknowledgement by polling MSR[NDF](NACK Detect Flag).&lt;/P&gt;
&lt;P&gt;Please try to test the following code:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;void LPI2C_Transmit (uint8_t address)/* Transmit ID and expects an ACK to be returned */&lt;BR /&gt;{&lt;BR /&gt;LPI2C0-&amp;gt;MTDR = (0x04&amp;lt;&amp;lt;8)|((address&amp;lt;&amp;lt;1)|0);&lt;BR /&gt;}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;LPI2C_DRV_MasterInit(0, &amp;amp;lpi2c1_MasterConfig0, &amp;amp;lpi2c1MasterState);&lt;BR /&gt;LPI2C0-&amp;gt;MCFGR1 |= LPI2C_MCFGR1_AUTOSTOP_MASK; //Automatic STOP Generation&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(i=1; i&amp;lt;127; i++)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/DIV&gt;
&lt;DIV&gt;//&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LPI2C_DRV_MasterSetSlaveAddr(INST_LPI2C1, i, false);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LPI2C_Transmit(i);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;delay(100);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if((((LPI2C0-&amp;gt;MSR) &amp;amp; LPI2C_MSR_NDF_MASK) &amp;gt;&amp;gt; LPI2C_MSR_NDF_SHIFT)==true)&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LPI2C0-&amp;gt;MSR &amp;amp;= LPI2C_MSR_NDF_MASK;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LPUART_DRV_SendDataBlocking(INST_LPUART2, Space, sizeof(Space), TIMEOUT);&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; sprintf( Buffer,"0x%X", i);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; LPUART_DRV_SendDataBlocking(INST_LPUART2, Buffer, sizeof(Buffer), 10000);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Robin&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;
&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 12:25:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/I2C-Scanner-using-Processor-Expert-for-S32K146EVB/m-p/1888198#M36627</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2024-06-15T12:25:57Z</dc:date>
    </item>
  </channel>
</rss>

