<?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: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754098#M45978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some new findings after I use the example codes from KSDK2.3.0. I saw that if I were to toggle the SS line between bytes (as shown in the&amp;nbsp;first image), the communication seemed to function without issue:&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/34896i43A168974528FD1D/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;However, if I were to toggle the SS line between multiple-byte transfers (as shown in the&amp;nbsp;second image), I would encounter the issue again:&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/34931i6A6B128B00150046/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;Do you have any idea why I would see such behavior?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2018 18:48:03 GMT</pubDate>
    <dc:creator>cheekaitan</dc:creator>
    <dc:date>2018-02-02T18:48:03Z</dc:date>
    <item>
      <title>K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754080#M45960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're seeing an issue that only happens sometimes.&amp;nbsp; We are using the fsl_dspi.c/h modules with SPI in slave configuration.&amp;nbsp; We are transfering 4 bytes to the host and they should be: 0x79, 0xB8, 0xF8, 0x99.&amp;nbsp; However, sometimes, we actually get 0x79, 0x79, 0xB8, 0xF8.&amp;nbsp; Then, instead of getting an 0x99 on the next SPI transfer, we keep getting 0xF8.&amp;nbsp; It seems that there was some kind of error on the dspi_slave_transfer_callback_t(not kStatus_Success) and possibly an RX overflow.&amp;nbsp; We think we've tied this to SS behavior on the host side where the SS is held low longer, but we have no real explanation for why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone had issues like this, or can point us in to how to proceed here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2018 21:34:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754080#M45960</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-02T21:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754081#M45961</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;What's the MCUXpresso SDK software package version you are using?&lt;/P&gt;&lt;P&gt;Have you tried with the latest&lt;A href="https://mcuxpresso.nxp.com/en/welcome"&gt; MCUXpresso SDK&lt;/A&gt; software package ?&lt;/P&gt;&lt;P&gt;The latest SDK Version for FRDM-K22F board:&lt;/P&gt;&lt;P&gt;KSDK 2.3.0&amp;nbsp; (released 2017-11-16)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 03:11:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754081#M45961</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-04T03:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754082#M45962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We were using SDK 2.2.0.&amp;nbsp; We tried KSDK 2.3.0 and see the same issue.&amp;nbsp; Is it possible this is introduced by the FIFOs?&amp;nbsp; The next thing we can try is rewriting all the SPI driver to not use the FIFO....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 22:49:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754082#M45962</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-04T22:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754083#M45963</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;Please provide the K22 product full part number and related mask set (You could find related info at chip surface silkprint). Thanks.&lt;/P&gt;&lt;P&gt;The FIFOs should not affect the SPI transmit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&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>Fri, 05 Jan 2018 03:10:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754083#M45963</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-05T03:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754084#M45964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MK22FN512VLH12&amp;nbsp;&lt;/P&gt;&lt;P&gt;ON50M&lt;/P&gt;&lt;P&gt;CTAA1611B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jan 2018 19:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754084#M45964</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-05T19:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754085#M45965</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;Thank you for the info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try to call the DSPI_FlushFifo() function before the SPI Slave transmit?&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/51925iEF579F9389C45CAC/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;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&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>Mon, 08 Jan 2018 07:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754085#M45965</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-08T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754086#M45966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We tried this but nothing changed.&amp;nbsp; No surprise here because the SPI Slave transmit function,&amp;nbsp;DSPI_SlaveTransferNonBlocking(), already calls&amp;nbsp;DSPI_FlushFifo().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:17:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754086#M45966</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-10T00:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754087#M45967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chuck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help to provide your DSPI slave code.&lt;/P&gt;&lt;P&gt;I want to regenerate your mentioned issue on site.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 09:00:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754087#M45967</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-10T09:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754088#M45968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where can I attach it?&amp;nbsp; I have stripped down our code and have a reproducible build source I can give you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 00:13:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754088#M45968</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-11T00:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754089#M45969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chuck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you want to attach a file, please click [Use advanced editor], then you can find [Attach] button.&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/2355i2CCFD9BA0AC72976/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_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2405i34C48011F11CBD85/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;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 03:31:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754089#M45969</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-11T03:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754090#M45970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is an example which reproduces the issue.&amp;nbsp; The SPI slave (the device running this code) should send the bytes {1, 2, 3, 4} on ever transfer of 4 bytes.&amp;nbsp; Sometimes we get {1, 1, 3, 4}.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:48:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754090#M45970</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-11T14:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754091#M45971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were you able to duplicate the issue?&amp;nbsp; Any feedback?&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:11:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754091#M45971</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-15T17:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754092#M45972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chuck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, sorry for the delay reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could regenerate your mentioned issue.&lt;/P&gt;&lt;P&gt;While, I find you are using K22 SPI1 module, not SPI0.&lt;/P&gt;&lt;P&gt;Please check below difference about K22 SPI0 vs. SPI1:&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/13958i0C7228A9DBFF6E56/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_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/14110i185952FC53372161/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;I also check the MCUXpresso V2.3 for FRDM-K22F board DSPI slave half-duplex-transfer demo, which is using SPI0 module with below register setting:&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/14075i3BC20045C1BAAB57/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;&lt;/P&gt;&lt;P&gt;If you could change your application code with SPI0 module, then check if there still with the same issue?&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&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>Wed, 17 Jan 2018 09:13:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754092#M45972</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-17T09:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754093#M45973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We actually originally used the SPI0 before and had same issue. we have since changed to SPI1 for a different reason and the issue remains.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, just a note that we are configured for full dupleex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 16:37:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754093#M45973</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-17T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754094#M45974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chunk,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, sorry for the later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tried to use the DSPI interrupt mode to do the SPI slave communication?&lt;/P&gt;&lt;P&gt;Please refer the MCUXpresso SDK for K22 DSPI driver example &amp;lt;interrupt&amp;gt; for the detailed info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this way, it will clear to see the communication process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 05:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754094#M45974</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-23T05:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754095#M45975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example I gave you is already using DSPI_SlaveTransferNonBlocking() which uses the interrupts.&amp;nbsp; This is the same thing done in "interrupt transfer" example.&amp;nbsp; There is another example called "Interrupt" that doesn't use the SDK Interrupt Handlers but instead re-implements them.&amp;nbsp; Is that what you are asking me to try?&amp;nbsp; Is there a known issue with the SDK interrupt handlers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 17:15:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754095#M45975</guid>
      <dc:creator>chuckhorkin</dc:creator>
      <dc:date>2018-01-23T17:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754096#M45976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chuck,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I want you to try with the [interrupt_b2b]_slave demo, which located at below default folder:&lt;/P&gt;&lt;P&gt;..\SDK_2.3.0_FRDM-K22F\boards\frdmk22f\driver_examples\dspi\interrupt_b2b\slave&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 06:44:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754096#M45976</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-01-24T06:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754097#M45977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is Chee. I have been working with Chuck on this issue. We have tried using the example in the interrupt_b2b slave demo. The issue still remains. Any other suggestions to workaround this? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 19:38:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754097#M45977</guid>
      <dc:creator>cheekaitan</dc:creator>
      <dc:date>2018-01-30T19:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754098#M45978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some new findings after I use the example codes from KSDK2.3.0. I saw that if I were to toggle the SS line between bytes (as shown in the&amp;nbsp;first image), the communication seemed to function without issue:&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/34896i43A168974528FD1D/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;However, if I were to toggle the SS line between multiple-byte transfers (as shown in the&amp;nbsp;second image), I would encounter the issue again:&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/34931i6A6B128B00150046/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;Do you have any idea why I would see such behavior?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chee&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 18:48:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754098#M45978</guid>
      <dc:creator>cheekaitan</dc:creator>
      <dc:date>2018-02-02T18:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754099#M45979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chee,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the later reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find the same issue from FRDM-K22F board.&lt;/P&gt;&lt;P&gt;With using the continue chip select, the first byte will be transfer twice.&lt;/P&gt;&lt;P&gt;The SPI chip select continuous asserted:&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/43642iD4C22DC12547E0DD/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;The SPI chip select is not continuous asserted:&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/43717i00E7175CBB1E5465/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;The K22 reference manual shows below info:&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/43811i979051C371006C54/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;The SPI Slave shift register will be updated with two conditions (Or logic):&lt;/P&gt;&lt;P&gt;1&amp;gt; at second SCK clock edge of the each frame to the shift register if the SS signal is asserted;(shift register old value will continue be transferred, after that start to transfer the new value)&lt;/P&gt;&lt;P&gt;2&amp;gt; any time when transmit data is ready and SS signal is negated.(shift register value will be updated with new value, and start to transfer the new value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, when the SPI Slave TX shift register will transfer the first byte twice with SS signal continuous asserted.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43390i1B82C03D55799715/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When SPI Slave with SS signal negated will load new value to update the TX shift register.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43492i3B2D6C77C1968D70/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My test software is based on [dspi_interrupt] demo with below path:&lt;/P&gt;&lt;P&gt;..\SDK_2.3.0_FRDM-K22F\boards\frdmk22f\driver_examples\dspi\interrupt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Mike&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>Mon, 05 Feb 2018 08:32:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22-DSPI-in-Slave-Mode-Sometimes-Has-Duplicate-TX-Bytes/m-p/754099#M45979</guid>
      <dc:creator>Hui_Ma</dc:creator>
      <dc:date>2018-02-05T08:32:24Z</dc:date>
    </item>
  </channel>
</rss>

