<?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: LPSPI  TCF and FCF in S32K</title>
    <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052748#M6969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;Thanks for replying to my email,&lt;/P&gt;&lt;P&gt;I want to achieve the following design,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  1.  I want to transfer 10frames(each frame of framesize is 32bits) one after other without any interrupts to save time. I configured this in DMA so DMA will copy when SPI TDR request for it. I don't have problem here. Ican able to start.&lt;/P&gt;&lt;P&gt;  2.  My problem is, SPI is keep on triggering DMA, I am not finding ways to stop or halt the SPI after 10frames. I could do it only in ISR after disabling DMA. But the time it activates the isr is OS dependent. I fear that SPI would have triggered DMA some number of times, which will fail my timing requirement. I want to stop transfer after 10 frames ie: SPI should not put any frames in the bus after 10th frame is sent.&lt;/P&gt;&lt;P&gt;  3.  I want only 10frames to be sent on SPI bus and not more. SO every 10ms I will send 10 frames to configure and read the data from slave chip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kardhik Sambathkumar&lt;/P&gt;&lt;P&gt;Platform Software&lt;/P&gt;&lt;P&gt;Innov &amp;amp; Tech Devel Div&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caterpillar: Confidential Green&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2020 13:59:34 GMT</pubDate>
    <dc:creator>sambath_kumar_k</dc:creator>
    <dc:date>2020-07-09T13:59:34Z</dc:date>
    <item>
      <title>LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052744#M6965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am confused between&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TCF Transfer Complete Flag ISR&lt;/LI&gt;&lt;LI&gt;FCF Frame Complete Flag ISR&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What I want ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to send 10spi frames from Master to one of the slave chip one after another, whereas I dont want to have isr for every end frame whereas I want to have isr end of 10 spi frames. I was using mpc5777C where I have EOQ(End Of Queue) isr to have this function,&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;DO I have any option to do the same in S32k ?&lt;/LI&gt;&lt;LI&gt;what is the difference between TCF vs FCF&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; I am using DMA to copy tx fifo and DMA to copy from rx fifo.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2020 15:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052744#M6965</guid>
      <dc:creator>sambath_kumar_k</dc:creator>
      <dc:date>2020-07-01T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052745#M6966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/sambath_kumar_kardhik@cat.com"&gt;sambath_kumar_kardhik@cat.com&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is explained in the RM.&lt;BR /&gt;The FCF flag is set every time a frame is complete, and the PCS has negated.&lt;BR /&gt;The TCF flag is set when PCS has negated, and the transmit/command FIFO is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I think you can use the TCF flag if the DMA can keep the TX FIFO &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; empty during the transfer, then, the TCF flag will be set once all the 10 frames have been sent (PCS deasserted) and the TX FIFO is empty.&lt;BR /&gt;But at the time the TCF flag is set, the DMA RX transfer might be still in progress.&lt;BR /&gt;You could use the DMA major loop complete interrupt if the DMA transfers 10 frames from the LPSPI RX FIFO per a major loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2020 11:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052745#M6966</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-07-02T11:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052746#M6967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I want?&lt;/P&gt;&lt;P&gt;I want to send 10frames(frame size is 32bits). After 10 frames SPI should not send any message in the SPI bus. I use DMA.&lt;/P&gt;&lt;P&gt;What should be my configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I observe?&lt;/P&gt;&lt;P&gt;When I set  CONTC bit during first 9 frames and in 10th frame, I clear the CONTC bit. Then The transfer is getting halted. What is the theory behind this,&lt;/P&gt;&lt;P&gt;I read the below in the reference manual, the behaviour is contradicting. It says,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please provide a small example code or configuration of the above case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kardhik Sambathkumar&lt;/P&gt;&lt;P&gt;Platform Software&lt;/P&gt;&lt;P&gt;Innov &amp;amp; Tech Devel Div&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caterpillar: Confidential Green&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 18:53:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052746#M6967</guid>
      <dc:creator>sambath_kumar_k</dc:creator>
      <dc:date>2020-07-08T18:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052747#M6968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/sambath_kumar_kardhik@cat.com"&gt;sambath_kumar_kardhik@cat.com&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The continuous transfer feature was discussed here:&lt;BR /&gt;&lt;A href="https://community.nxp.com/message/1319825"&gt;https://community.nxp.com/message/1319825&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can keep the CONTC bit = 0 all the time, unless you want to change the command during an ongoing continues transfer without terminating it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don’t understand this decription:&lt;BR /&gt;“When I set CONTC bit during first 9 frames and in 10th frame, I clear the CONTC bit. Then The transfer is getting halted. What is the theory behind this”.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to write one command and load the transmit data register with the data you want to send.&lt;BR /&gt;In case of a continuous transfer (CS asserted between frames), use the CONT = 1 bit in the commands.&lt;BR /&gt;The continuous transfer ends when a new command is written to the transmit command register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:00:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052747#M6968</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-07-09T11:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052748#M6969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&lt;/P&gt;&lt;P&gt;Thanks for replying to my email,&lt;/P&gt;&lt;P&gt;I want to achieve the following design,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  1.  I want to transfer 10frames(each frame of framesize is 32bits) one after other without any interrupts to save time. I configured this in DMA so DMA will copy when SPI TDR request for it. I don't have problem here. Ican able to start.&lt;/P&gt;&lt;P&gt;  2.  My problem is, SPI is keep on triggering DMA, I am not finding ways to stop or halt the SPI after 10frames. I could do it only in ISR after disabling DMA. But the time it activates the isr is OS dependent. I fear that SPI would have triggered DMA some number of times, which will fail my timing requirement. I want to stop transfer after 10 frames ie: SPI should not put any frames in the bus after 10th frame is sent.&lt;/P&gt;&lt;P&gt;  3.  I want only 10frames to be sent on SPI bus and not more. SO every 10ms I will send 10 frames to configure and read the data from slave chip.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kardhik Sambathkumar&lt;/P&gt;&lt;P&gt;Platform Software&lt;/P&gt;&lt;P&gt;Innov &amp;amp; Tech Devel Div&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Caterpillar: Confidential Green&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 13:59:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052748#M6969</guid>
      <dc:creator>sambath_kumar_k</dc:creator>
      <dc:date>2020-07-09T13:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: LPSPI  TCF and FCF</title>
      <link>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052749#M6970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Kardhik,&lt;/P&gt;&lt;P&gt;You can transfer 10 x 32b per a major DMA loop and trigger one major loop at a time.&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/536862"&gt;SPI DMA problem&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2020 12:45:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/LPSPI-TCF-and-FCF/m-p/1052749#M6970</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2020-07-13T12:45:40Z</dc:date>
    </item>
  </channel>
</rss>

