<?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: Need LPI2C example in S32K</title>
    <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617132#M182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach the project that is receiving wrong data? Also it would be useful to add the expected and received data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rares&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2017 14:41:19 GMT</pubDate>
    <dc:creator>raresvasile</dc:creator>
    <dc:date>2017-01-13T14:41:19Z</dc:date>
    <item>
      <title>Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617131#M181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need one LPI2C master mode working example, referring to the example under SD32 installation, it see can send out right data, but get the wrong data when receiving. &amp;nbsp;This LPI2C module is different with old Freescale MCU.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 14:33:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617131#M181</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-01-13T14:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617132#M182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach the project that is receiving wrong data? Also it would be useful to add the expected and received data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rares&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2017 14:41:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617132#M182</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-01-13T14:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617133#M183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Bares:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pls help check my project, I just didn't use interrupt, and change the below codes, masterCallback =0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;const lpi2c_master_user_config_t lpi2c1_MasterConfig0 = {&lt;BR /&gt;&amp;nbsp; .slaveAddress = 127U,&lt;BR /&gt;&amp;nbsp; .is10bitAddr = false,&lt;BR /&gt;&amp;nbsp; .operatingMode = LPI2C_STANDARD_MODE,&lt;BR /&gt;&amp;nbsp; .baudRate = 100000U,&lt;BR /&gt;&amp;nbsp; .baudRateHS = 0U,&lt;BR /&gt;&amp;nbsp; .masterCode = 0U,&lt;BR /&gt;&amp;nbsp; .transferType = LPI2C_USING_INTERRUPTS,&lt;BR /&gt;&amp;nbsp; .masterCallback = 0&lt;STRONG&gt;,//lpi2c1_MasterCallback0&lt;/STRONG&gt;,&lt;BR /&gt;&amp;nbsp; .callbackParam = NULL,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jan 2017 09:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617133#M183</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-01-14T09:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617134#M184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming that you want to read a value from an address, in your case &lt;STRONG&gt;0x8C&lt;/STRONG&gt;, you need to modify the code to perform a repeated start instead of a stop-start sequence when writing the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;for (i = 0u; i &amp;lt; TRANSFER_SIZE; i++)&lt;BR /&gt;{&lt;BR /&gt; buffer[i] = i;&lt;BR /&gt;}&lt;BR /&gt;buffer[0]=0x8C;&lt;BR /&gt;/* Send a packet of data to the bus slave */&lt;BR /&gt;LPI2C_DRV_MasterSendDataBlocking(FSL_LPI2C1,buffer,1, &lt;STRONG&gt;false /* Do not send stop after the transfer */&lt;/STRONG&gt;, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;/* Clear the buffer to prepare it for the next operation */&lt;/P&gt;&lt;P&gt;/* Request data from the bus slave */&lt;BR /&gt;LPI2C_DRV_MasterReceiveDataBlocking(FSL_LPI2C1, buffer, 3, true, OSIF_WAIT_FOREVER);&lt;/P&gt;&lt;P&gt;for(i=0;i&amp;lt;9999;i++);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snip with a read operation of some IC registers(I can confirm the validity of the data, since reading the WHO_AM_I register returned the expected data):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/12384i1AFDA76B94A79FA0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the callback name generation, you should replace in the lpi2c component&amp;nbsp;&lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;lpi2c1_MasterCallback0&amp;nbsp;&lt;/STRONG&gt;with&amp;nbsp;&lt;STRONG&gt;NULL&amp;nbsp;&lt;/STRONG&gt;to avoid modifying it at every code generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 08:06:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617134#M184</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-01-16T08:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617135#M185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Bares:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It's ok now!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Huaping&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 01:32:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617135#M185</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-01-17T01:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617136#M186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Rares:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The project was ok in DS V1.2, now we upgrade to V1.3, and find it is error when compile, then we find it is the reason when add the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;LPI2C_DRV_MasterInit(FSL_LPI2C1, &amp;amp;lpi2c1_MasterConfig0,&amp;amp;lpi2c1MasterState);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; but this is necessary to do initial.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Would you pls help check my project as attached?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 06:57:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617136#M186</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-02-27T06:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617137#M187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huaping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you attach the log of the failed build?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 08:15:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617137#M187</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-02-27T08:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617138#M188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rares:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I can't upload project, so I write one ticket in TIC for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pls help it!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 05:57:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617138#M188</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-02-28T05:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617139#M189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rares:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;May I know what version of DS you are using? V1.2 or V1.3?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I change&amp;nbsp;masterCallback = NULL, it is ok to compile, but the code always return back at the below codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lpi2c_master_state_t *master = g_lpi2cMasterStatePtr[instance]; &amp;nbsp; &amp;nbsp; &amp;nbsp;// I can't find it where is used&lt;BR /&gt; if (master == NULL)&lt;BR /&gt; {&lt;BR /&gt; return LPI2C_STATUS_FAIL; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // it return for here&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/* mark transfer as blocking */&lt;BR /&gt; master-&amp;gt;blocking = true;&lt;/P&gt;&lt;P&gt;retVal = LPI2C_DRV_MasterSendData(instance, txBuff, txSize, sendStop); &amp;nbsp; // can't run here, if I delete the below codes, it will jump to ISR interrupt.&lt;/P&gt;&lt;P&gt;I don't know how to upload the project again, can't find it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 14:46:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617139#M189</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-02-28T14:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617140#M190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huaping,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest using S32 DS V1.3 as it is improved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you calling the init function prior to using LPI2C_DRV_MasterSendDataBlocking? It seems that the driver is not initialized(&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;g_lpi2cMasterStatePtr[instance] is configured in Init function&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can attach the project by clicking on "Use advanced editor" on top-right corner when replying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:06:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617140#M190</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-02-28T15:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617141#M191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rares:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Pls help check my project!&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;thanks a lot!&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 02:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617141#M191</guid>
      <dc:creator>huaping</dc:creator>
      <dc:date>2017-03-01T02:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need LPI2C example</title>
      <link>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617142#M192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Huaping,&lt;/P&gt;&lt;P&gt;Please find attached the project which was updated to fix the reported issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had found the following issues which triggered the unwanted behaviour:&lt;/P&gt;&lt;P&gt;&amp;nbsp;1)&amp;nbsp;&amp;nbsp;&amp;nbsp;System OSC source was configured in Clock Manager to use External Reference. If you are using the DEVKIT, the source should be Internal Oscillator, as the input for the clock is retrieved from a crystal oscillator on PTB6 and PTB7 pins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;2)&amp;nbsp;&amp;nbsp;&amp;nbsp;Functional clock for LPI2C was configured in PCC to use SPLLDIV2 which was disabled in the &lt;SPAN&gt;Clock Manager &amp;nbsp;&lt;/SPAN&gt;component. Functional clock should be selected from an Async divider which is enabled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;3) LPI2C baud rate was configured as 0. It should be greater than 0. Also selected pins for LPI2C were PTB7 and PTB6 which are used for Crystal input. I had routed SDA and SCL to PTA2 and PTA3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rares&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:27:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Need-LPI2C-example/m-p/617142#M192</guid>
      <dc:creator>raresvasile</dc:creator>
      <dc:date>2017-03-01T10:27:11Z</dc:date>
    </item>
  </channel>
</rss>

