<?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>S32K中的主题 Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
    <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525014#M17833</link>
    <description>&lt;P&gt;It is given by following bits in Transmit Command Register (TCR):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_0-1663674698393.png" style="width: 606px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194313i057B93D2FA9A7707/image-dimensions/606x385?v=v2" width="606" height="385" role="button" title="davidtosenovjan_0-1663674698393.png" alt="davidtosenovjan_0-1663674698393.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_1-1663674763269.png" style="width: 546px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194314iEE672F6C15243FE8/image-dimensions/546x273?v=v2" width="546" height="273" role="button" title="davidtosenovjan_1-1663674763269.png" alt="davidtosenovjan_1-1663674763269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 11:53:06 GMT</pubDate>
    <dc:creator>davidtosenovjan</dc:creator>
    <dc:date>2022-09-20T11:53:06Z</dc:date>
    <item>
      <title>Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1524086#M17780</link>
      <description>&lt;P&gt;void SPI_Init(LPSPI_Type *instance,SpiSpeedType Speed)&lt;BR /&gt;{&lt;BR /&gt;instance-&amp;gt;IER = 0x00000000; /* Interrupts not used */&lt;BR /&gt;instance-&amp;gt;DER = 0x00000000; /* DMA not used */&lt;BR /&gt;instance-&amp;gt;CFGR0 = 0x00000000; /* Defaults: */&lt;BR /&gt;/* RDM0=0: rec'd data to FIFO as normal */&lt;BR /&gt;/* CIRFIFO=0; Circular FIFO is disabled */&lt;BR /&gt;/* HRSEL, HRPOL, HREN=0: Host request disabled */&lt;BR /&gt;instance-&amp;gt;CFGR1 = LPSPI_CFGR1_MASTER(1); /* Configurations: master mode */&lt;BR /&gt;/* PCSCFG=0: PCS[3:2] are enabled */&lt;BR /&gt;/* OUTCFG=0: Output data retains last value when CS negated */&lt;BR /&gt;/* PINCFG=0: SIN is input, SOUT is output */&lt;BR /&gt;/* MATCFG=0: Match disabled */&lt;BR /&gt;/* PCSPOL=0: PCS is active low */&lt;BR /&gt;/* NOSTALL=0: Stall if Tx FIFO empty or Rx FIFO full */&lt;BR /&gt;/* AUTOPCS=0: does not apply for master mode */&lt;BR /&gt;/* SAMPLE=0: input data sampled on SCK edge */&lt;BR /&gt;/* MASTER=1: Master mode */&lt;/P&gt;&lt;P&gt;instance-&amp;gt;TCR |= LPSPI_TCR_PRESCALE(SpiSpeed.prescale)| /* PRESCALE=2: Functional clock divided by 40M/2 = 20M */&lt;BR /&gt;LPSPI_TCR_PCS(2) |&lt;BR /&gt;LPSPI_TCR_FRAMESZ(7); /* FRAMESZ=7: # bits in frame = 7+1=8 */&lt;/P&gt;&lt;P&gt;instance-&amp;gt;CCR |= LPSPI_CCR_SCKDIV(SpiSpeed.sckdiv) | /* 20/(8+2) = 2M */&lt;BR /&gt;LPSPI_CCR_DBT(8) |&lt;BR /&gt;LPSPI_CCR_SCKPCS(4) |&lt;BR /&gt;LPSPI_CCR_PCSSCK(4);&lt;BR /&gt;&lt;BR /&gt;instance-&amp;gt;FCR = LPSPI_FCR_TXWATER(3); /* RXWATER=0: Rx flags set when Rx FIFO &amp;gt;0 */&lt;BR /&gt;/* TXWATER=3: Tx flags set when Tx FIFO &amp;lt;= 3 */&lt;BR /&gt;instance-&amp;gt;CR = LPSPI_CR_MEN_MASK&lt;BR /&gt;|LPSPI_CR_DBGEN_MASK; /* Enable module for operation */&lt;BR /&gt;/* DBGEN=1: module enabled in debug mode */&lt;BR /&gt;/* DOZEN=0: module enabled in Doze mode */&lt;BR /&gt;/* RST=0: Master logic not reset */&lt;BR /&gt;/* MEN=1: Module is enabled */&lt;BR /&gt;}&lt;BR /&gt;uint8_t LPSPI_ReadWriteByte(LPSPI_Type *instance,uint8_t byte)&lt;BR /&gt;{&lt;BR /&gt;uint8_t recieve = 0;&lt;/P&gt;&lt;P&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;/P&gt;&lt;P&gt;return recieve; /* Return received data */&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 07:53:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1524086#M17780</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-19T07:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525014#M17833</link>
      <description>&lt;P&gt;It is given by following bits in Transmit Command Register (TCR):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_0-1663674698393.png" style="width: 606px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194313i057B93D2FA9A7707/image-dimensions/606x385?v=v2" width="606" height="385" role="button" title="davidtosenovjan_0-1663674698393.png" alt="davidtosenovjan_0-1663674698393.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="davidtosenovjan_1-1663674763269.png" style="width: 546px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/194314iEE672F6C15243FE8/image-dimensions/546x273?v=v2" width="546" height="273" role="button" title="davidtosenovjan_1-1663674763269.png" alt="davidtosenovjan_1-1663674763269.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 11:53:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525014#M17833</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-09-20T11:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525031#M17835</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613"&gt;@davidtosenovjan&lt;/a&gt;&amp;nbsp;thanks for your answer,but why there are three bytes before each byte is 0x00, please see the picture in the attachment .&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 12:18:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525031#M17835</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-20T12:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525881#M17862</link>
      <description>&lt;P&gt;Why you are transmitting per four bytes when the function seems to be written per byte? Which data you are transmitting, it is not apparent from your code snippet.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 12:32:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525881#M17862</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-09-21T12:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525893#M17864</link>
      <description>&lt;P&gt;transmit buffer is ：&lt;/P&gt;&lt;P&gt;spi_buffer_t master_buffer =&lt;BR /&gt;{&lt;BR /&gt;.tx = {0xA,0xB,0xC,0xD,0xE,0xF,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,0x1,0xAA},&lt;BR /&gt;.rx = {0}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;IMG src="D:\spi.png" border="0" alt="" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2022 13:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525893#M17864</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-21T13:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525895#M17865</link>
      <description />
      <pubDate>Wed, 21 Sep 2022 13:05:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1525895#M17865</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-21T13:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1527032#M17892</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613"&gt;@davidtosenovjan&lt;/a&gt;&amp;nbsp; The null byte problem has been solved, but I still have a question to ask, why does CS keep low level after TCD CONC is enabled?&amp;nbsp;Please see the attached picture .&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 01:18:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1527032#M17892</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-23T01:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1527375#M17916</link>
      <description>&lt;P&gt;Here you may read description to understand how to set CONT/CONTC bits:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/S32K14x-Command-Word-in-LPSPI/td-p/1040779" target="_blank"&gt;https://community.nxp.com/t5/S32K/S32K14x-Command-Word-in-LPSPI/td-p/1040779&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 12:31:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1527375#M17916</guid>
      <dc:creator>davidtosenovjan</dc:creator>
      <dc:date>2022-09-23T12:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why is CS pulled high before LPSPI has finished transmitting?</title>
      <link>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1528033#M17965</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/52613"&gt;@davidtosenovjan&lt;/a&gt;&amp;nbsp; my problem has been solved ！&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 09:17:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Why-is-CS-pulled-high-before-LPSPI-has-finished-transmitting/m-p/1528033#M17965</guid>
      <dc:creator>kalvin</dc:creator>
      <dc:date>2022-09-26T09:17:38Z</dc:date>
    </item>
  </channel>
</rss>

