<?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: SPI SLAVE MODE in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010512#M149662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="353712" data-username="devendra.yaramareddy@iwavesystems.com" href="https://community.nxp.com/people/devendra.yaramareddy@iwavesystems.com"&gt; DEVENDRA&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;1. You connections are no problem.&lt;/P&gt;&lt;P&gt;2. Issues on SPI Slave mode&lt;/P&gt;&lt;P&gt;On slave mode, it has been described in spi driver, drives/spi/spi-imx.c&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ecspi has a HW issue when works in Slave mode,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * after 64 words writtern to TXFIFO, even TXFIFO becomes empty,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * ECSPI_TXDATA keeps shift out the last word data,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * so we have to disable ECSPI when in slave mode after the&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * transfer completes&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (spi_imx-&amp;gt;devtype_data-&amp;gt;disable)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_imx-&amp;gt;devtype_data-&amp;gt;disable(spi_imx);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Therefore, please use other methods to test your eCSPI interface and configure eCSPI to work in Master mode.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Hope above information is helpful for you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Have a nice day!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;B.R,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Weidong&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Mar 2020 03:57:14 GMT</pubDate>
    <dc:creator>weidong_sun</dc:creator>
    <dc:date>2020-03-19T03:57:14Z</dc:date>
    <item>
      <title>SPI SLAVE MODE</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010511#M149661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the imx8 in my project, with two spi controllers i.e ECSPI1 &amp;amp; ECSPI2. After checking imx6 spi controller source code i came to know that spi controller can be configured in slave mode,now i want implement same feature in imx8 also i.e&lt;STRONG&gt; ECSPI1 as master , ECSPI2 as a slave device and vice versa&lt;/STRONG&gt;. Then i added the patch file provided in the below link&lt;STRONG&gt;&amp;nbsp;&lt;A class="link-titled" href="https://patchwork.kernel.org/patch/7266901/" title="https://patchwork.kernel.org/patch/7266901/"&gt;[v2,8/8] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chips - Patchwork&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;for spi slave support in imx8. Compiled the source code successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For transmitting the data from master and slave side i am using&lt;STRONG&gt; spidev_test&lt;/STRONG&gt; application but facing problem while receiving the data.some time slave receiving it's own transmitting data instead of master transmitted data, other cases it' getting junk data.&lt;/P&gt;&lt;P&gt;Kernel_version:4.14.98&lt;/P&gt;&lt;P&gt;Spi connections:&lt;/P&gt;&lt;P&gt;ECSPI1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ECSP2&lt;/P&gt;&lt;P&gt;MOSI&amp;nbsp;------------------&amp;gt; MOSI&lt;/P&gt;&lt;P&gt;MISO ------------------&amp;gt;MISO&lt;/P&gt;&lt;P&gt;SS&amp;nbsp; &amp;nbsp; &amp;nbsp; ------------------&amp;gt;SS&lt;/P&gt;&lt;P&gt;SCLK&amp;nbsp; -------------------&amp;gt;SCLK&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;can you confirm my hardware connections and provide me the correct test procedure and commands to be applied in master and salve side.provide me the slave controller clock settings and other configurations to be done for salve mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: If it's not validated in imx8 then consider for imx6.i am not sure about the master and slave testing procedure, followed below test procedure&amp;nbsp; &amp;nbsp;&lt;A class="link-titled" href="https://www.digi.com/resources/documentation/digidocs/90001547/reference/bsp/v4-1_6ul/r_spi_v4-1.htm?TocPath=Additional%20resources%7CLinux%20v4.1%20Board%20Support%20Package%7C_____19#Limitati" title="https://www.digi.com/resources/documentation/digidocs/90001547/reference/bsp/v4-1_6ul/r_spi_v4-1.htm?TocPath=Additional%20resources%7CLinux%20v4.1%20Board%20Support%20Package%7C_____19#Limitati"&gt;Serial peripheral interface (SPI)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Devendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 09:49:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010511#M149661</guid>
      <dc:creator>devendra_yarama</dc:creator>
      <dc:date>2020-03-10T09:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPI SLAVE MODE</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010512#M149662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="353712" data-username="devendra.yaramareddy@iwavesystems.com" href="https://community.nxp.com/people/devendra.yaramareddy@iwavesystems.com"&gt; DEVENDRA&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;1. You connections are no problem.&lt;/P&gt;&lt;P&gt;2. Issues on SPI Slave mode&lt;/P&gt;&lt;P&gt;On slave mode, it has been described in spi driver, drives/spi/spi-imx.c&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* ecspi has a HW issue when works in Slave mode,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * after 64 words writtern to TXFIFO, even TXFIFO becomes empty,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * ECSPI_TXDATA keeps shift out the last word data,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * so we have to disable ECSPI when in slave mode after the&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * transfer completes&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (spi_imx-&amp;gt;devtype_data-&amp;gt;disable)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;spi_imx-&amp;gt;devtype_data-&amp;gt;disable(spi_imx);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Therefore, please use other methods to test your eCSPI interface and configure eCSPI to work in Master mode.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Hope above information is helpful for you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Have a nice day!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;B.R,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;Weidong&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2020 03:57:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010512#M149662</guid>
      <dc:creator>weidong_sun</dc:creator>
      <dc:date>2020-03-19T03:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: SPI SLAVE MODE</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010513#M149663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Weidong,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you  for your Response,i applied the NXP patch in that slave &lt;/P&gt;&lt;P&gt;disable after 64 words transfer support is there.As you mentioned please &lt;/P&gt;&lt;P&gt;use other methods to test your eCSPI interface and configure eCSPI to &lt;/P&gt;&lt;P&gt;work in Master mode , can you provide the test procedure for SPI master &lt;/P&gt;&lt;P&gt;and slave mode testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Devendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2020 05:20:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-SLAVE-MODE/m-p/1010513#M149663</guid>
      <dc:creator>devendra_yarama</dc:creator>
      <dc:date>2020-03-19T05:20:27Z</dc:date>
    </item>
  </channel>
</rss>

