<?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>P-SeriesのトピックRe: SPI TXCNT and RXCNT</title>
    <link>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736129#M4364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Is there simple program example for detection similar incorrect behavior?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Attached file contains simple eSPI program code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Nov 2017 03:22:24 GMT</pubDate>
    <dc:creator>Pavel</dc:creator>
    <dc:date>2017-11-02T03:22:24Z</dc:date>
    <item>
      <title>SPI TXCNT and RXCNT</title>
      <link>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736128#M4363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes, at the "end" of a long 16-bit SPI frame transfer, the P1011 (SPI Master) shows RXCNT = 32, TXCNT = 30, and DON =0.&amp;nbsp; I suspect the full RX buffer encountered during the transfer has caused the SPI Master to suspended the transfer of the last character, but cannot find this behaviour detailed anywhere.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that the application SW has made an assumption that if the TXCNT indicates so many bytes have been sent from the TX Buffer, then a corresponding number of bytes will have been received into the RX Buffer (and attempts to read that many bytes out of the RX FIFO without checking RXCNT), but I wonder if propagation through&amp;nbsp;TX and RX&amp;nbsp;shift registers&amp;nbsp;upsets that&amp;nbsp;assumption.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A colleague wonders if the discrepancy has instead come about though the TX side not always keeping the TX FIFO adequately filled, so that at some point, transmission continued without valid data to send.&amp;nbsp; Would that happen, or would the SPI CLK pause when the buffer is empty but the full frame has not yet been sent?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a more detailed description of P1011/P1020 SPI operation that you could direct me to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 18:09:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736128#M4363</guid>
      <dc:creator>andyjones</dc:creator>
      <dc:date>2017-10-31T18:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TXCNT and RXCNT</title>
      <link>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736129#M4364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Is there simple program example for detection similar incorrect behavior?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Attached file contains simple eSPI program code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 03:22:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736129#M4364</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2017-11-02T03:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: SPI TXCNT and RXCNT</title>
      <link>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736130#M4365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've not been able to get access to the rig, to test your offering.&amp;nbsp; In the mean time, what I have found is that the witnessed behaviour of the SPI_CLK stopping when the RXCNT = 32, keeping the SPI_CS0 active, appears to be consistent with SPI behaviour described in AN3904 (relating to another part of the Power Architecture range), MPC5212e SPI.&amp;nbsp; Can you confirm whether the underlined statement, and the note from AN3904&amp;nbsp;are equally applicable to our P1011 SPI behaviour?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: medium;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-family: Calibri; font-size: medium;"&gt;“…&lt;/SPAN&gt;&lt;SPAN style="font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;we have&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;to count with the delay (a few processor ticks) between the Tx/Rx FIFO slices and the Tx/Rx shift&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;register in the SPI module. There are a few possible ways to do this. The simplest way to cover it&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;is to &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;compare the amount of transmitted data and amount of received data&lt;/EM&gt;&lt;/SPAN&gt;. This is why polling&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;mode is not recommended for SPI mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: Helvetica-Bold; font-size: 12pt;"&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;In SPI master mode the PSC controls the serial data transfers. If the Tx FIFO&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;becomes empty (underrun) or the Rx FIFO becomes full (overflow) in the&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;middle of a multi-byte transfer, rather than set the Tx underrun or Rx&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;overflow status bits, the PSC keeps the slave select signal low/active and&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000; font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;stops the SCKL serial clock. When the Tx FIFO is no longer empty and the&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-family: TimesNewRomanPSMT; font-size: 12pt;"&gt;Rx FIFO no longer full, the transfer proceeds.&lt;/SPAN&gt;&lt;SPAN style="font-family: Calibri; font-size: medium;"&gt;”&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Up to this point, at each TXTHR triggered interrupt, our code has been reading as many words from the 32-byte RX FIFO as we are able to load into the TX FIFO, and has, I was told,&amp;nbsp;been robust.&amp;nbsp; However, on closer examination, it seems there may have been a filtering out of these events, and only reporting a series of events in a row.&amp;nbsp; So, we are gearing up to check if the events are happening but are getting filtered out by Software.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to determine when the TXCNT decrements relative to the TX of the byte that triggers the Interrupt, and how long is it before the corresponding RX buffer has a matching number of received bytes?&amp;nbsp; Is this a timing formula based on SPI clock cycles, CCB, or other?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Nov 2017 16:37:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/P-Series/SPI-TXCNT-and-RXCNT/m-p/736130#M4365</guid>
      <dc:creator>andyjones</dc:creator>
      <dc:date>2017-11-02T16:37:58Z</dc:date>
    </item>
  </channel>
</rss>

