<?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: LPSPI for Slave Mode Communication</title>
    <link>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822085#M3128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;This is up to you whether you use interrupts or DMA.&lt;BR /&gt;You can refer to SDK examples: lpspi_transfer_s32k144 &amp;amp; lpspi_dma_s32k144&lt;/P&gt;&lt;P&gt;The lpspi_tranfer uses interrupts.&lt;BR /&gt;If you halt the example after the slave transfer function, you can see all the registers configuration of the slave (LPSPI1).&lt;BR /&gt;At: &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/65934iF370F62B80E810AA/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;Also, in the example, the slave data are prepared before the MasterTrasferBlocking function is called.&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/65935iB7ED0537765C654F/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;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;No, the AUTOPCS bit doesn’t need to be set. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2018 19:54:26 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2018-07-19T19:54:26Z</dc:date>
    <item>
      <title>LPSPI for Slave Mode Communication</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822084#M3127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Support Team,&lt;/P&gt;&lt;P&gt;In one of the project S32K144 is slave device. There will be a big chunk of data transfer between master and S32K slave.(64 Bytes of data in one chip select assertion ) and this will be a period frame for every 10ms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want you suggestion which method is optimal for this communication.? Interrupt of DMA ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First i want to try interrupt method. (DMA is new for me)&lt;/P&gt;&lt;P&gt;Configuration for this as per my understanding.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set module in slave mode&lt;/LI&gt;&lt;LI&gt;Set chip select polarity&lt;/LI&gt;&lt;LI&gt;TX and RX FIFO water mark&lt;/LI&gt;&lt;LI&gt;Chip select, clock polarity, clock phase, prescaler, Msb first, frame size(32bit)&lt;/LI&gt;&lt;LI&gt;Enable interrupt for receive data&amp;nbsp;RDIE. (No TX interrupt)&lt;/LI&gt;&lt;LI&gt;Enable LPSPI module.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per datasheet,&lt;/P&gt;&lt;P&gt;Point 1. Slave Mode: Before the LPSPI_PCS input asserts, the transmit FIFO must be filled with&lt;BR /&gt;transmit data, or the transmit error flag will set? I did not understand this point. I am implementing my own code, but I referred SDK code, i do not see above point(Point 1) taken care in SDK.&lt;/P&gt;&lt;P&gt;I need your input regarding this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Point 2. Slave Mode:&amp;nbsp;AUTOPCS bit config register 1(CFGR1), Is this bit need to be set for Slave mode ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your inputs for above two points and please correct me if am missing anything in configuration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2018 10:40:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822084#M3127</guid>
      <dc:creator>bharathkumarm</dc:creator>
      <dc:date>2018-07-17T10:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI for Slave Mode Communication</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822085#M3128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;This is up to you whether you use interrupts or DMA.&lt;BR /&gt;You can refer to SDK examples: lpspi_transfer_s32k144 &amp;amp; lpspi_dma_s32k144&lt;/P&gt;&lt;P&gt;The lpspi_tranfer uses interrupts.&lt;BR /&gt;If you halt the example after the slave transfer function, you can see all the registers configuration of the slave (LPSPI1).&lt;BR /&gt;At: &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/65934iF370F62B80E810AA/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;Also, in the example, the slave data are prepared before the MasterTrasferBlocking function is called.&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/65935iB7ED0537765C654F/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;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;No, the AUTOPCS bit doesn’t need to be set. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2018 19:54:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822085#M3128</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2018-07-19T19:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI for Slave Mode Communication</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822086#M3129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For me LPSPI as slave is not working. Meaning RX interrupt is not working.&lt;/P&gt;&lt;P&gt;I tried to Poll RDF flag but no use.&lt;/P&gt;&lt;P&gt;I checked Spi lines from master to LPSPI slave on CRO. I am able to observe CS, CLK and Data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the attached code and debugger snap shot for configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me understanding what i am missing in configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture1.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/68215i970725ECF9D19022/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note. Verified Port pins for alternate function configuration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:11:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-for-Slave-Mode-Communication/m-p/822086#M3129</guid>
      <dc:creator>bharathkumarm</dc:creator>
      <dc:date>2018-09-06T13:11:31Z</dc:date>
    </item>
  </channel>
</rss>

