<?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: S32k144 LPSPI2 SPI Pal Processor expert</title>
    <link>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885065#M4188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following versions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_versions.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75489iC5F651F356683639/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_versions.PNG" alt="NXP_versions.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me spi2.c does not contain an instance definition. Instead in the spi_pal_mapping.h the following enum is defined:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_enum.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75534i799376E788CC945F/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_enum.PNG" alt="NXP_enum.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me the original code of the example can be seen below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_original.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75575i505224E8D74BD84B/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_original.PNG" alt="NXP_original.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I simply change the last 0 into a 2 to match the correct instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Sebastiaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2019 09:18:21 GMT</pubDate>
    <dc:creator>s_verhoek</dc:creator>
    <dc:date>2019-03-14T09:18:21Z</dc:date>
    <item>
      <title>S32k144 LPSPI2 SPI Pal Processor expert</title>
      <link>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885063#M4186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use the processor expert spi pal to initialize a slave spi instance on the LPSPI2 pins.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When doing this, however, the code gets stuck on the:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPI_SlaveInit(SPI_OVER_LPSPI02_INSTANCE, &amp;amp;SlaveConfig0);&lt;/P&gt;&lt;P&gt;function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically on the:&lt;/P&gt;&lt;P&gt;status = LPSPI_DRV_SlaveInit(instance, (lpspi_state_t*)(&amp;amp;LpspiState[index]), &amp;amp;lpspiConfig);&lt;/P&gt;&lt;P&gt;fucntion of spi_pal.c and&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(void)LPSPI_SetMasterSlaveMode(base, LPSPI_SLAVE);&lt;/P&gt;&lt;P&gt;of lpspi_slave_driver.c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Afterwhich the WDOG_EWM_IRQHandler() is called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens for all projects I create and also the basic spi_pal_s32k144 example project where the spi2 component is changed to LPSPI2 and in the &lt;SPAN&gt;SPI_SlaveInit the instance is changed to "SPI_OVER_LPSPI02_INSTANCE"&lt;/SPAN&gt;. See modification steps from the images below. LPSPI0 and LPSPI1&amp;nbsp;are working fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI problem.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/71896iC08B0333BF33DB74/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI problem.PNG" alt="SPI problem.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="SPI problem2.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/71861i0EA9207C5A44FC14/image-size/large?v=v2&amp;amp;px=999" role="button" title="SPI problem2.PNG" alt="SPI problem2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug in the Processor Expert code or am I doing something wrong. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Sebastiaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2019 19:24:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885063#M4186</guid>
      <dc:creator>s_verhoek</dc:creator>
      <dc:date>2019-03-11T19:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: S32k144 LPSPI2 SPI Pal Processor expert</title>
      <link>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885064#M4187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sebastiaan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the spi_pal_S32K144 example. The&amp;nbsp;SPI_SlaveInit function expects as the first&amp;nbsp;parameter type (&lt;EM&gt;const &lt;STRONG&gt;spi_instance_t&lt;/STRONG&gt; * const instance,...)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So, I'm not sure why you change the &lt;SPAN style="color: #ff0000;"&gt;&amp;amp;spi2Instance&lt;/SPAN&gt;&amp;nbsp; in the function &lt;STRONG&gt;SPI_SlaveInit(&lt;SPAN style="color: #ff0000;"&gt;&amp;amp;spi2Instance&lt;/SPAN&gt;, &amp;amp;SlaveConfig0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Which SDK version&amp;nbsp;do you use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I change the LPSPI2 in the spi2 component the generated code change also index of the instance.&lt;/P&gt;&lt;P&gt;&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/73699i362A581BE22F1EAC/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;I hope it helps.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 12:35:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885064#M4187</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-03-13T12:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: S32k144 LPSPI2 SPI Pal Processor expert</title>
      <link>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885065#M4188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following versions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_versions.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75489iC5F651F356683639/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_versions.PNG" alt="NXP_versions.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me spi2.c does not contain an instance definition. Instead in the spi_pal_mapping.h the following enum is defined:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_enum.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75534i799376E788CC945F/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_enum.PNG" alt="NXP_enum.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me the original code of the example can be seen below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="NXP_original.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75575i505224E8D74BD84B/image-size/large?v=v2&amp;amp;px=999" role="button" title="NXP_original.PNG" alt="NXP_original.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I simply change the last 0 into a 2 to match the correct instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Sebastiaan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 09:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885065#M4188</guid>
      <dc:creator>s_verhoek</dc:creator>
      <dc:date>2019-03-14T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: S32k144 LPSPI2 SPI Pal Processor expert</title>
      <link>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885066#M4189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sebastiaan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your details. In that case, I would like to recommend you to use the newest SDK version.&lt;/P&gt;&lt;P&gt;(if your application requirements allow it)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-342805"&gt;S32 Design Studio for ARM 2018.R1 - Update 9 available&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, you can try that spi_pal_S32K144 example with LPSPI2 works without problem.&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/75013iF794552FDFD6A23E/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;&lt;/P&gt;&lt;P&gt;I hope it&amp;nbsp;helps.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Diana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 11:58:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/S32k144-LPSPI2-SPI-Pal-Processor-expert/m-p/885066#M4189</guid>
      <dc:creator>dianabatrlova</dc:creator>
      <dc:date>2019-03-14T11:58:00Z</dc:date>
    </item>
  </channel>
</rss>

