<?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: Using SPI of Flexcomm with GPIO CS in LPC54608, the slave sends 1st dummy 0xFF. Can I fix it? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1255690#M44493</link>
    <description>&lt;P&gt;in the case of using GPIO simulate CS, you need make sure the slave &lt;SPAN&gt;transmission&amp;nbsp;buffer the right data before sending. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;On slave side, I suggest you&amp;nbsp; dummy read spi right after slave spi initialization to clear the transmission buffer then write the valid data to it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 11:42:50 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2021-04-02T11:42:50Z</dc:date>
    <item>
      <title>Using SPI of Flexcomm with GPIO CS in LPC54608, the slave sends 1st dummy 0xFF. Can I fix it?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1253539#M44465</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Flexcomm's SPI only supports SSEL0, SSEL1.&amp;nbsp;&amp;nbsp;Datasheet description says up to 4 SSs, except FC3 &amp;amp; FC4 the SS pins exist only SSEL0, SSEL1 in chip package.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So, I am&lt;SPAN&gt;&amp;nbsp;testing using GPIO to selecting over 4 SPI devices.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all, I use lpcxpresso54608_freertos_spi example to see exactly how Master-slave communicates. (Attached Figure 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In this code, you changed the SSEL0 setting to GPIO, adding GPIO control before and after communication.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The master-&amp;gt;slave communication is displayed normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In slave-&amp;gt;master communication, the first byte is added as a pile of 0xFF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Attached Figure 2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps, it's because GPIO CS occurs before the clock.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Is there any way to modify it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Note, I attach the code to test GPIO_CS "_with_gpio.zip".)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(and also I attach the console log of GPIO_CS).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 11:10:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1253539#M44465</guid>
      <dc:creator>toipaz</dc:creator>
      <dc:date>2021-03-29T11:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using SPI of Flexcomm with GPIO CS in LPC54608, the slave sends 1st dummy 0xFF. Can I fix it?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1254762#M44481</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;toipaz&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Your Figure 2. No data missing on MISO. just one data later comparing with Figure 1.&lt;/P&gt;
&lt;P&gt;I think the problem is not due to SPI master fill the first as FF, but slave send data issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please check your SPI slave code, monitoring with scope, when receive first data from master, what does it send out?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jun Zhang&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 07:09:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1254762#M44481</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-03-31T07:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using SPI of Flexcomm with GPIO CS in LPC54608, the slave sends 1st dummy 0xFF. Can I fix it?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1254821#M44484</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I test it over and over again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Slave's first transfer data is not the first data I want to send, but the data that was previously in Buffer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Whenever the communication by Master resumes, if I want to start transmission on Slave, the first byte is "data left in previous FIFO." (attach file: GPIO_log.txt)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The repeat test is performed accurately in synchronization with code using SSELn. (attach file: SSELn_log.txt)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With GPIO CS, the first transmission from Slave is "previously FIFO(?) data."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As you can see by comparing the two codes, only GPIO CS was added to the Master in the basic structure...&lt;BR /&gt;I don't know what I did wrong, so I ask you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 08:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1254821#M44484</guid>
      <dc:creator>toipaz</dc:creator>
      <dc:date>2021-03-31T08:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using SPI of Flexcomm with GPIO CS in LPC54608, the slave sends 1st dummy 0xFF. Can I fix it?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1255690#M44493</link>
      <description>&lt;P&gt;in the case of using GPIO simulate CS, you need make sure the slave &lt;SPAN&gt;transmission&amp;nbsp;buffer the right data before sending. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;On slave side, I suggest you&amp;nbsp; dummy read spi right after slave spi initialization to clear the transmission buffer then write the valid data to it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 11:42:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Using-SPI-of-Flexcomm-with-GPIO-CS-in-LPC54608-the-slave-sends/m-p/1255690#M44493</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2021-04-02T11:42:50Z</dc:date>
    </item>
  </channel>
</rss>

