<?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: s32k LPSPI RX FIFO clearing and NO Stall option in S32K</title>
    <link>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951109#M5234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you considered using the Receive Data Mask&amp;nbsp;TCR_RXMSK&amp;nbsp; = 1 for such transfers?&amp;nbsp;&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/85812iB1F36898357CF01B/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;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85813i296CC4C3C5311383/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Jun 2019 11:24:35 GMT</pubDate>
    <dc:creator>danielmartynek</dc:creator>
    <dc:date>2019-06-10T11:24:35Z</dc:date>
    <item>
      <title>s32k LPSPI RX FIFO clearing and NO Stall option</title>
      <link>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951108#M5233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some questions regarding the use of LPSPI:&lt;/P&gt;&lt;P&gt;I am using S32K144 micro to communicate through SPI as a Master.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am observing that when the RxFIFO in LPSPI1_FSR-&amp;gt; RXCOUNT reaches the maximum (4), it makes the CS line to be held. I have the NO STALL option set to 0 for my LPSPI port, so I understand is actually STALLING the SPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I debug, and have my debugger monitor the Register LPSPI1_FSR, when executing step by step, the RXCount is decremented on each step and alwas is either 1 or 0. However, when I use breakpoints to check why the SPI is not communicating I see that the register shows RXcount=4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using only Transmit (TX) commands to write to another device through SPI. In most of the code I am using, I am not interested in reading the the info coming from the slave. i.e. I am triggering a watchdog trhough SPI, and I dont need to read the info in the RX line every time I trigger the watchdog.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Q: Does this mean that I need to flush the RX FIFO every time I do a TX? What is the most efficient way to do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Reading the LPSPI1_RDR-&amp;gt;DATA register?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I choose not to use the STALL option, by setting NO STALL=1, I still see the RX FIFO gets full and if I try to read, &lt;SPAN style="color: #0000ff;"&gt;Q:&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN style="color: #0000ff;"&gt;the information it will not be from the last command I sent but from the first, right? do I need to purge the RX FIFO before trying to do a request to read from my slave device?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2019 17:55:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951108#M5233</guid>
      <dc:creator>christianhdz</dc:creator>
      <dc:date>2019-06-05T17:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: s32k LPSPI RX FIFO clearing and NO Stall option</title>
      <link>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951109#M5234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you considered using the Receive Data Mask&amp;nbsp;TCR_RXMSK&amp;nbsp; = 1 for such transfers?&amp;nbsp;&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/85812iB1F36898357CF01B/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;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/85813i296CC4C3C5311383/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;BR, Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 11:24:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951109#M5234</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-06-10T11:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: s32k LPSPI RX FIFO clearing and NO Stall option</title>
      <link>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951110#M5235</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;I tried it per your suggestion, however this disables the possibility of receiving any data right? Though most of my communication is through TX only, there are some cases where I need to "read" from the slave module some status.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I I had tried before was to read the RDR register at least 4 times...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((LPSPI1-&amp;gt;SR &amp;amp; LPSPI_SR_REF_MASK)||(LPSPI1-&amp;gt;FSR!=0)){ /*Check if RX FIFO is empty, if not, CLEAR IT*/&lt;/P&gt;&lt;P&gt;SPI_data= LPSPI1-&amp;gt;RDR;&lt;BR /&gt;&lt;SPAN&gt;SPI_&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;= LPSPI1-&amp;gt;RDR;&lt;BR /&gt;&lt;SPAN&gt;SPI_&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;= LPSPI1-&amp;gt;RDR;&lt;BR /&gt;&lt;SPAN&gt;SPI_&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;= LPSPI1-&amp;gt;RDR;&lt;BR /&gt;&lt;SPAN&gt;SPI_&lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;= LPSPI1-&amp;gt;RDR;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But sometimes while debugging, before entering to a Write or Read SPI routine, I check the FIFO register and it still appears there is 1 object in the RXFIFO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:01:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951110#M5235</guid>
      <dc:creator>christianhdz</dc:creator>
      <dc:date>2019-06-10T18:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: s32k LPSPI RX FIFO clearing and NO Stall option</title>
      <link>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951111#M5236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;You can change the command&amp;nbsp;with another write to the&amp;nbsp;Transmit Command Register (TCR) whenever you need.&lt;/P&gt;&lt;P&gt;You can&amp;nbsp;use two commands, one command for TX only and one for&amp;nbsp;receiving the status data.&lt;/P&gt;&lt;P&gt;Please note that the TCR register should only be written using 32-bit writes.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/86942i4712695FE1B6088A/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&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, 13 Jun 2019 12:42:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k-LPSPI-RX-FIFO-clearing-and-NO-Stall-option/m-p/951111#M5236</guid>
      <dc:creator>danielmartynek</dc:creator>
      <dc:date>2019-06-13T12:42:01Z</dc:date>
    </item>
  </channel>
</rss>

