<?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 i.MX6Q ECSPI rx byte shift in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725008#M112713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;During development of an spidev based application running on a i.MX6 quad processor I have come across the following behavior:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@imx6q:~# ./spidev_test -s14000000 -H 1 -O 1 -D /dev/spidev4.0 -v&lt;BR /&gt;spi mode: 0x3&lt;BR /&gt;bits per word: 8&lt;BR /&gt;max speed: 14000000 Hz (14000 KHz)&lt;BR /&gt;TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D&amp;nbsp; | ......@....�..................�.&lt;BR /&gt;RX | 0D FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0&amp;nbsp; | &lt;A href="mailto:.......@....ï¿½..................ï¿½"&gt;.......@....�..................�&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that the application using spidev is triggering a bug that shifts the ECSPI input by one byte.&lt;/P&gt;&lt;P&gt;E.g. the first RX byte after an SPI transaction is from the previous transaction. The speed and mode does not affect the behavior. The port works fine at first, but after some time the issue appears and reboot is required to correct the behavior. I have tested this on ECSPI port 0 and 5. The issues is triggered on port 5 after only a few minutes while it takes several hours on port 0. Looks like this issue disappears if DMA is disabled. The latest FW (v3.3) does not solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have anybody seen this issue or have an idea about what can cause this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 May 2018 05:14:58 GMT</pubDate>
    <dc:creator>apni</dc:creator>
    <dc:date>2018-05-04T05:14:58Z</dc:date>
    <item>
      <title>i.MX6Q ECSPI rx byte shift</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725008#M112713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;During development of an spidev based application running on a i.MX6 quad processor I have come across the following behavior:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@imx6q:~# ./spidev_test -s14000000 -H 1 -O 1 -D /dev/spidev4.0 -v&lt;BR /&gt;spi mode: 0x3&lt;BR /&gt;bits per word: 8&lt;BR /&gt;max speed: 14000000 Hz (14000 KHz)&lt;BR /&gt;TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D&amp;nbsp; | ......@....�..................�.&lt;BR /&gt;RX | 0D FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0&amp;nbsp; | &lt;A href="mailto:.......@....ï¿½..................ï¿½"&gt;.......@....�..................�&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that the application using spidev is triggering a bug that shifts the ECSPI input by one byte.&lt;/P&gt;&lt;P&gt;E.g. the first RX byte after an SPI transaction is from the previous transaction. The speed and mode does not affect the behavior. The port works fine at first, but after some time the issue appears and reboot is required to correct the behavior. I have tested this on ECSPI port 0 and 5. The issues is triggered on port 5 after only a few minutes while it takes several hours on port 0. Looks like this issue disappears if DMA is disabled. The latest FW (v3.3) does not solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have anybody seen this issue or have an idea about what can cause this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 05:14:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725008#M112713</guid>
      <dc:creator>apni</dc:creator>
      <dc:date>2018-05-04T05:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6Q ECSPI rx byte shift</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725009#M112714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anders&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what bsp used in the case, one can try with nxp releases&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.1.15_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.1.15_2.0.0_ga"&gt;linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Documentation:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-software-and-development-tool-resources:IMX_SW" title="https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-software-and-development-tool-resources:IMX_SW"&gt;i.MX Software|NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&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, 04 May 2018 23:23:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725009#M112714</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-05-04T23:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6Q ECSPI rx byte shift</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725010#M112715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we are using Yocto rocko with upstream kernel version 4.14.15.&lt;/P&gt;&lt;P&gt;We will try if using the bsp version solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 05:05:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725010#M112715</guid>
      <dc:creator>apni</dc:creator>
      <dc:date>2018-05-07T05:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6Q ECSPI rx byte shift</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725011#M112716</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;My collage Sean found the problem. It was caused by a DMA misconfiguration of the SPI5 port:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;A href="https://patchwork.kernel.org/patch/10425383/" rel="noopener noreferrer" target="_blank"&gt;https://patchwork.kernel.org/patch/10425383/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;Best regards&lt;BR /&gt;Anders&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2018 09:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725011#M112716</guid>
      <dc:creator>apni</dc:creator>
      <dc:date>2018-06-04T09:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6Q ECSPI rx byte shift</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725012#M112717</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;Looks like the patch above did not solve the problem so we are still looking for a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2018 05:56:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6Q-ECSPI-rx-byte-shift/m-p/725012#M112717</guid>
      <dc:creator>apni</dc:creator>
      <dc:date>2018-09-21T05:56:56Z</dc:date>
    </item>
  </channel>
</rss>

