<?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: S32K144:SPI Transfer in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069792#M6428</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;here's the difference:&lt;/P&gt;&lt;P&gt;&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/112274i9100B3AA2548D381/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;&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/112275iDD0781E3C9E6B063/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;That means you need to wait for TCF flag, not for TDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2020 05:14:59 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2020-06-09T05:14:59Z</dc:date>
    <item>
      <title>S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069791#M6427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use SPI transfer with CS as GPIO. I'm performing following steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Making the CS LOW&lt;/P&gt;&lt;P&gt;2. Pushing to data in the FIFO&lt;/P&gt;&lt;P&gt;3. Making the CS HIGH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm able to transfer the data&amp;nbsp;but my CS goit HIGH (Step 3) Far ahead of the transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CS_LOW;&lt;/P&gt;&lt;P&gt;LPSPI0-&amp;gt;TDR = LPSPI_TDR_DATA(n) ;&amp;nbsp;&lt;BR /&gt; while((LPSPI0-&amp;gt;SR &amp;amp; LPSPI_SR_TDF_MASK)&amp;gt;&amp;gt;LPSPI_SR_TDF_SHIFT==0) {}&amp;nbsp;&lt;/P&gt;&lt;P&gt;CS_HIGH;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help in this regard,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 10:45:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069791#M6427</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2020-06-08T10:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069792#M6428</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;here's the difference:&lt;/P&gt;&lt;P&gt;&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/112274i9100B3AA2548D381/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;&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/112275iDD0781E3C9E6B063/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;That means you need to wait for TCF flag, not for TDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 05:14:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069792#M6428</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2020-06-09T05:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069793#M6429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I tried waitng till&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt; &lt;/SPAN&gt;while((LPSPI0-&amp;gt;SR &amp;amp; LPSPI_SR_TCF_MASK)&amp;gt;&amp;gt;LPSPI_SR_TCF_SHIFT==0) {}&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Even I tried to wait for the FCF flag to set. I don't see any change considering by frame length as 7+1 bits&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&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/112281i012DCC3CC4535AC0/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 style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;but, stranges the TCF, FCF, WCF flag will set immeadiately after writing the data into the tranmit buffer though theCS still holds the LOW.&lt;/P&gt;&lt;P style="border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="border: 0px;"&gt;Kindly help in this regard,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 05:52:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069793#M6429</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2020-06-09T05:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069794#M6430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a good point, I did quick test and I can see that too. TCF flag is obviously set when data are transferred to shift register and physical transmission is not considered. &lt;/P&gt;&lt;P&gt;But in fact, the description is correct:&lt;/P&gt;&lt;P&gt;"In master mode when the LPSPI returns to idle state with the transmit FIFO empty, the Transfer Complete Flag will set."&lt;/P&gt;&lt;P&gt;In other words, TCF is set immediately when FIFO is empty.&lt;/P&gt;&lt;P&gt;As a workaround, you can use delay loop instead for waiting for flag. Just calculate required time for your SPI frequency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 08:29:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069794#M6430</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2020-06-09T08:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069795#M6431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lukas for the Support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, using a delay loop is not a good idea I feel. Any other idea is greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 08:35:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069795#M6431</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2020-06-09T08:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144:SPI Transfer</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069796#M6432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/* SPI FLASH Sequence for 1 bytes is OK */&lt;/P&gt;&lt;P&gt;LPSPI1-&amp;gt;TCR = ((LPSPI1-&amp;gt;TCR) | (LPSPI_TCR_BYSW_MASK));&lt;BR /&gt; LPSPI1-&amp;gt;TCR = ((LPSPI1-&amp;gt;TCR) &amp;amp; (~LPSPI_TCR_BYSW_MASK));&lt;BR /&gt; LPSPI1-&amp;gt;FCR = 0x00000003; /* RXWATER=0 TXWATER=3 */&lt;BR /&gt; lpspi_tmp = ((LPSPI1-&amp;gt;TCR) &amp;amp; (~LPSPI_TCR_FRAMESZ_MASK));&lt;BR /&gt; LPSPI1-&amp;gt;TCR = (lpspi_tmp | (7U &amp;amp; LPSPI_TCR_FRAMESZ_MASK));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PINS_DRV_ClearPins(PTB, 1 &amp;lt;&amp;lt; 17); /* Software Control PCS3 : SET PCS3 LOW */&lt;/P&gt;&lt;P&gt;while (((LPSPI1-&amp;gt;SR &amp;amp; LPSPI_SR_TDF_MASK) &amp;gt;&amp;gt; LPSPI_SR_TDF_SHIFT) == 0);&lt;BR /&gt; LPSPI1-&amp;gt;TDR = ( uint32_t ) (*txdata_p++);&amp;nbsp; /*&amp;nbsp;&lt;SPAN&gt;for 1 bytes &lt;/SPAN&gt;*/&lt;BR /&gt; LPSPI1-&amp;gt;TCR = ((LPSPI1-&amp;gt;TCR) | (LPSPI_TCR_TXMSK_MASK)); /* Start Transmit and Hardware Auto Clear */&lt;BR /&gt; LPSPI1-&amp;gt;TCR = ((LPSPI1-&amp;gt;TCR) &amp;amp; (~LPSPI_TCR_RXMSK_MASK));&lt;BR /&gt; LPSPI1-&amp;gt;SR |= LPSPI_SR_TDF_MASK; /* Clear TDF flag */&lt;BR /&gt; while (((LPSPI1-&amp;gt;SR &amp;amp; LPSPI_SR_RDF_MASK) &amp;gt;&amp;gt; LPSPI_SR_RDF_SHIFT) == 0);&lt;BR /&gt; lpspi_tmp = LPSPI1-&amp;gt;RDR;&lt;BR /&gt;*rxdata_p++ = ( uint8_t ) (lpspi_tmp &amp;gt;&amp;gt; 0);&lt;BR /&gt; while (((LPSPI1-&amp;gt;SR &amp;amp; LPSPI_SR_FCF_MASK) &amp;gt;&amp;gt; LPSPI_SR_FCF_SHIFT) == 0);&lt;/P&gt;&lt;P&gt;LPSPI1-&amp;gt;SR&amp;nbsp; |= LPSPI_SR_RDF_MASK | LPSPI_SR_FCF_MASK;&lt;BR /&gt; LPSPI1-&amp;gt;TCR = ((LPSPI1-&amp;gt;TCR) &amp;amp; (~LPSPI_TCR_CONTC_MASK));&lt;BR /&gt; LPSPI1-&amp;gt;CR = 0x00000000; /* Module Disable、Debug Disable */&lt;BR /&gt; PINS_DRV_SetPins(PTB, 1 &amp;lt;&amp;lt; 17); /* Software Control PCS3 : SET PCS3 High */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 12:37:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32K144-SPI-Transfer/m-p/1069796#M6432</guid>
      <dc:creator>wjandsq</dc:creator>
      <dc:date>2020-07-31T12:37:12Z</dc:date>
    </item>
  </channel>
</rss>

