<?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>LPC MicrocontrollersのトピックRe: lpc51u68 spi slave transmits duplicate bytes</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897397#M36011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Sorry for the delay, glad to hear that is working now,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;This could be happening because the value is being loaded twice to the shift register,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;This because of the CS is held low between transfers,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;it is possible that the 0x08 is already loaded before the second transfer begins and the flush of the FIFO&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;when the first transfer ends flush the 0x08 already loaded.&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hope it helps,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Jun 2019 22:37:45 GMT</pubDate>
    <dc:creator>AldoG</dc:creator>
    <dc:date>2019-06-13T22:37:45Z</dc:date>
    <item>
      <title>lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897388#M36002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm trying to create SPI slave API for my application using lpcxpresso51u68 board and i'm using SDK_2.5.0_LPC51U68.&lt;/P&gt;&lt;P&gt;i'm using master and slave from same board.my sample code for testing slave api is very simple, that is"transfer of 2 packets(3 bytes each)&amp;nbsp; between master and slave".&lt;/P&gt;&lt;P&gt;i gone thorugh spi interrupt slave example in sdk and created my api.&lt;/P&gt;&lt;P&gt;what i'm doing in api is:&lt;/P&gt;&lt;P&gt;1. configuring the pins&lt;/P&gt;&lt;P&gt;2. calling SPI_SlaveInit() with application defind configuration&lt;/P&gt;&lt;P&gt;3. calling SPI_SlaveTransferCreateHandle() to handle the irq and user callback to refill the next packet&lt;/P&gt;&lt;P&gt;4.caliing SPI_SlaveTransferNonBlocking()&lt;/P&gt;&lt;P&gt;in isr:&lt;/P&gt;&lt;P&gt;4.calling SPI_SlaveTransferHandleIRQ.&lt;/P&gt;&lt;P&gt;so,when i'm sending one packet and receiving one packet it seems to work perfectly.but when it is more than one packet slave loads duplicate byte into tx shift register after first packet (i thought i'm facing similar problem after i read this thread &lt;A href="https://community.nxp.com/thread/466937"&gt;K22 DSPI in Slave Mode Sometimes Has Duplicate TX Bytes&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;actually my sample application code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 1.sending 0x03,0x05,0x07 from master to slave &amp;lt;-&amp;gt;&amp;nbsp;responding with 0x02,0x04,0x06 from slave to master(first packet working perfectly)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 2.sending 0x09,0x0b,0x0d from master to slave &amp;lt;-&amp;gt; responding with 0x08,0x0a,0x0c from slave to master(but here slave is sending 0x08,0x08,0x0a)&lt;/P&gt;&lt;P&gt;extra thing i did: in second packet i read 4 bytes on master side and it gave me 0x08,0x08,0x0a,0x0c&lt;/P&gt;&lt;P&gt;so,does this mean slave adds one duplicate byte to tx shift register at the end of first packet?&lt;/P&gt;&lt;P&gt;if that is the case then how can i clear that.it's not mentioned anywhere in lpc51u68 manual about spi slave constraints.&lt;/P&gt;&lt;P&gt;if i'm facing same problem as &lt;A href="https://community.nxp.com/thread/466937"&gt;https://community.nxp.com/thread/466937&lt;/A&gt; this one,then the solution mentioned in that thread will cost me some things in my application side.&lt;/P&gt;&lt;P&gt;i'm struck at this one for a week.someone help me to solve this&lt;/P&gt;&lt;P&gt;also i attached output from my application&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2019 12:11:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897388#M36002</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-04-30T12:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897389#M36003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Hello,&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;I see that you are using the slave example from the SDK, if possible please try the SPI interrupt example,&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;this example, one spi instance as master and another spi instance as slave. Master sends a piece of data to slave,&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;and check if the slave received&amp;nbsp; the correct data.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Thank you.&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin: 0in; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 May 2019 17:41:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897389#M36003</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-05-03T17:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897390#M36004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.I already tested spi interrupt example with one instance as master and another one as slave,that is working fine.But when i'm trying to send more than packet it gives one duplicate byte.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 03:41:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897390#M36004</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-05-06T03:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897391#M36005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hi,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Could you check with an oscilloscope that the slave is actually sending the first byte twice?&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2019 20:10:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897391#M36005</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-05-09T20:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897392#M36006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes i checked with an oscilloscope.the result is&lt;/P&gt;&lt;P&gt;1) sending 0x03,0x05,0x07 from master to slave &amp;lt;-&amp;gt; responding with 0x02,0x04,0x06 from slave to master(first packet working perfectly)&lt;/P&gt;&lt;P&gt;2) sending 0x09,0x0b,0x0d from master to slave &amp;lt;-&amp;gt; responding with 0x08,0x0a,0x0c from slave to master(but here slave is sending 0x08,0x08,0x0a)&lt;/P&gt;&lt;P&gt;If you want to see the waveforms, i'll upload it.&lt;/P&gt;&lt;P&gt;and you can refer this threa also &lt;A href="https://community.nxp.com/thread/466937"&gt;https://community.nxp.com/thread/466937&lt;/A&gt;&amp;nbsp;, my problem is similar to this one.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2019 05:58:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897392#M36006</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-05-10T05:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897393#M36007</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;Sorry for my long delay could you share with me the code you are using,&lt;/P&gt;&lt;P&gt;I haven't been able to replicate this issue at my side,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 23:43:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897393#M36007</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-05-24T23:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897394#M36008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sorry,little busy with other project.Actually after this problem happened,i have tested driver example given in sdk(lpcxpresso51u68).That also gives me same problem.anyway i'm sharing example code here.waiting for your reply.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ananth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2019 10:06:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897394#M36008</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-06-03T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897395#M36009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ananth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with SDK and I have no problems at my side,&lt;/P&gt;&lt;P&gt;the example code you shared is the same as the one in the SDK,&lt;/P&gt;&lt;P&gt;could you share the project which gave you the original issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2019 22:56:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897395#M36009</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-06-05T22:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897396#M36010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;here i attached the my code where i got the problem.I created this driver with help of sdk example.and also i attached the oscilloscope results.&lt;/P&gt;&lt;P&gt;And yesterday i tried one solution(Line Number:263-266 on spi_mcux_lpc.c file).it worked out also but don't know how exactly it's working.can you explain me with that also..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ananth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2019 07:05:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897396#M36010</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-06-07T07:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897397#M36011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hello,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Sorry for the delay, glad to hear that is working now,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;This could be happening because the value is being loaded twice to the shift register,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;This because of the CS is held low between transfers,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;it is possible that the 0x08 is already loaded before the second transfer begins and the flush of the FIFO&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;when the first transfer ends flush the 0x08 already loaded.&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Hope it helps,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;Aldo.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2019 22:37:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897397#M36011</guid>
      <dc:creator>AldoG</dc:creator>
      <dc:date>2019-06-13T22:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: lpc51u68 spi slave transmits duplicate bytes</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897398#M36012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for the reply aldo.I too thought the problem is due to value being loaded into shift register again.But can you please explain me little bit more theoretically? why that is happening and why it not handled internally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ananth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2019 05:59:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc51u68-spi-slave-transmits-duplicate-bytes/m-p/897398#M36012</guid>
      <dc:creator>ananth1</dc:creator>
      <dc:date>2019-06-20T05:59:30Z</dc:date>
    </item>
  </channel>
</rss>

