<?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: How to use the LPSPI transfer complete flag ? in S32K</title>
    <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1529124#M18022</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613"&gt;@davidtosenovjan&lt;/a&gt;&amp;nbsp;, Do you have a reading and writing method for the LPSPI register version? I think there is still a problem with my reading and writing?&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 02:06:53 GMT</pubDate>
    <dc:creator>kalvin</dc:creator>
    <dc:date>2022-09-28T02:06:53Z</dc:date>
    <item>
      <title>How to use the LPSPI transfer complete flag ?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1528504#M17992</link>
      <description>&lt;P&gt;How to generate an interrupt when LPSPI sends a frame of data (CS is negative), and what flags can be used.&lt;/P&gt;&lt;P&gt;E.g:&lt;BR /&gt;LPSPI0-&amp;gt;IER |= LPSPI_IER_TCIE(1);&lt;BR /&gt;LPSPI_Interupt_Enable(LPSPI0,LPSPI0_IRQn,0xC);&lt;/P&gt;&lt;P&gt;void LPSPI0_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;LPSPI0-&amp;gt;SR |= LPSPI_SR_TCF_MASK;&lt;BR /&gt;}&lt;BR /&gt;This will always be interrupted, is this setting wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 03:38:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1528504#M17992</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-27T03:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the LPSPI transfer complete flag ?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1528834#M18013</link>
      <description>&lt;P&gt;You should rather use FCF flag&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_0-1664282755048.png" style="width: 648px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/195037i35ABA5D2A5246114/image-dimensions/648x170?v=v2" width="648" height="170" role="button" title="davidtosenovjan_0-1664282755048.png" alt="davidtosenovjan_0-1664282755048.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;TCF is set whenever is transmit FIFO empty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 12:46:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1528834#M18013</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-09-27T12:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the LPSPI transfer complete flag ?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1529094#M18021</link>
      <description>&lt;P&gt;//init&lt;/P&gt;&lt;P&gt;LPSPI0-&amp;gt;IER |= LPSPI_IER_FCIE(1);//LPSPI_IER_TCIE&lt;/P&gt;&lt;P&gt;LPSPI_Interupt_Enable(LPSPI0,LPSPI0_IRQn,0xC);&lt;/P&gt;&lt;P&gt;//read &amp;amp; write&lt;/P&gt;&lt;P&gt;uint8_t LPSPI_ReadWriteByte(LPSPI_Type *Instance,uint8_t byte)&lt;BR /&gt;{&lt;BR /&gt;uint8_t recieve = 0;&lt;BR /&gt;while((Instance-&amp;gt;SR &amp;amp; LPSPI_SR_TDF_MASK)&amp;gt;&amp;gt;LPSPI_SR_TDF_SHIFT==0);&lt;BR /&gt;/* Wait for Tx FIFO available */&lt;BR /&gt;Instance-&amp;gt;TDR = byte; /* Transmit data */&lt;BR /&gt;Instance-&amp;gt;SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */&lt;/P&gt;&lt;P&gt;// while((Instance-&amp;gt;SR &amp;amp; LPSPI_SR_RDF_MASK)&amp;gt;&amp;gt;LPSPI_SR_RDF_SHIFT==0);&lt;BR /&gt;/* Wait at least one RxFIFO entry */&lt;BR /&gt;recieve= Instance-&amp;gt;RDR; /* Read received data */&lt;BR /&gt;Instance-&amp;gt;SR |= LPSPI_SR_RDF_MASK; /* Clear RDF flag */&lt;BR /&gt;return recieve; /* Return received data */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void Spi_Transfer(LPSPI_Type *Instance,uint8_t *TxBuffer,uint8_t *RxBuffer,uint32_t length)&lt;BR /&gt;{&lt;BR /&gt;uint32_t i = 0;&lt;BR /&gt;Instance-&amp;gt;TCR |= LPSPI_TCR_CONT(1)|LPSPI_TCR_CONTC(1);&lt;BR /&gt;for(i = 0;i&amp;lt;length;i++)&lt;BR /&gt;{&lt;BR /&gt;RxBuffer[i] = LPSPI_ReadWriteByte(Instance,TxBuffer[i]);&lt;BR /&gt;}&lt;BR /&gt;Instance-&amp;gt;TCR &amp;amp;= ~LPSPI_TCR_CONTC_MASK;&lt;BR /&gt;Instance-&amp;gt;SR |= LPSPI_SR_FCF_MASK;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;//IRQ&lt;/P&gt;&lt;P&gt;void LPSPI0_IRQHandler(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;LPSPI0-&amp;gt;SR |= LPSPI_SR_FCF_MASK;&lt;/P&gt;&lt;P&gt;//LPSPI0-&amp;gt;SR &amp;amp;= ~LPSPI_SR_FCF_MASK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't transfer data according to the above settings, I don't know how to set it now.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 01:17:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1529094#M18021</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-28T01:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the LPSPI transfer complete flag ?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1529124#M18022</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613"&gt;@davidtosenovjan&lt;/a&gt;&amp;nbsp;, Do you have a reading and writing method for the LPSPI register version? I think there is still a problem with my reading and writing?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 02:06:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1529124#M18022</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-28T02:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the LPSPI transfer complete flag ?</title>
      <link>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1530172#M18050</link>
      <description>&lt;P&gt;I would use RDF and TDF flags, either for interrupt or polling methods.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 07:04:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/How-to-use-the-LPSPI-transfer-complete-flag/m-p/1530172#M18050</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-09-29T07:04:52Z</dc:date>
    </item>
  </channel>
</rss>

