<?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>i.MX ProcessorsのトピックRe: Weird SPI behavior on iMx6 running 3.14 Linux kernel</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417318#M62757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share your changes in a patch format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Aug 2017 17:04:45 GMT</pubDate>
    <dc:creator>fabio_estevam</dc:creator>
    <dc:date>2017-08-23T17:04:45Z</dc:date>
    <item>
      <title>Weird SPI behavior on iMx6 running 3.14 Linux kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417315#M62754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I have an iMx6 Quad board running SPI channel-2 using pins &lt;SPAN style="color: #1f497d;"&gt;(CSI0_DAT10) &lt;/SPAN&gt;for MISO, pin &lt;SPAN style="color: #1f497d;"&gt;(EIM_CS1) &lt;/SPAN&gt;for MOSI and pin (EIM_D24) for the Chip select.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;I am seeing weird behavior with just this chip select where a valid 32-bit SPI transmit takes place to a slave SPI device. Than after some time running SPI OK the iMx6 locks the Ship Select signal active (low) forever. Killing the process of course, and killing all the fun.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Has anyone else seen any issues like this and/or has a fix?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Thanks a ton in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d;"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 22:55:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417315#M62754</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2015-11-17T22:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Weird SPI behavior on iMx6 running 3.14 Linux kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417316#M62755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an image of what a normal SPI packet looks like: The iMx6 is the SPI master. Yellow is SPI Clock, Blue is MOSI, Green is MISO, Pink is SPI Chip Select&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scope_7.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/29752i877B2D921A8F1C9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="scope_7.bmp" alt="scope_7.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Below is the image of when the iMx6 Linux SPI driver dies: I'm triggering on the Ship Select going low(active).&lt;/P&gt;&lt;P&gt;When the SPI driver dies, the &lt;STRONG&gt;Chip Select stays active low forever&lt;/STRONG&gt;. And all other SPI activity with that clock halts. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scope_5.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/29832iB7CFAADA8D787E21/image-size/large?v=v2&amp;amp;px=999" role="button" title="scope_5.bmp" alt="scope_5.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are three slave devices sharing this clock. Only when a slave SPI device is plugged into the &lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Chip select&lt;/SPAN&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; pin (EIM_D24) and another is plugged into the Chip Select pin (DISP0_DAT15) does this SPI driver crash issue occur. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I'm a Kinetis guy and in Kinetis, SPI is handled through hardware, and this condition could never happen.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;What I am being told is that on the iMx6, SPI is derived through software. So for some reason the SPI software in Linux is crashing, as seen by the Chip Select signal hanging low forever. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Also, this problem is intermittent. I cannot get this to happen on older revision iMx6 boards. And the newer revision boards will only die on 20% of the boards. Because of this I want to blame the iMx6 silicon, because if it were software it should happen on all boards, even the old boards because they all run the same software.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;We are going nuts here so any help or suggestions will be much appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #1f497d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2015 16:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417316#M62755</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2015-11-19T16:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Weird SPI behavior on iMx6 running 3.14 Linux kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417317#M62756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All right, we seem to have a workaround!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Problem&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;For some reason the Linux low level SPI driver acquired spurious data in a RX-fifo buffer, and only on some boards and only after an extended run time. The result is the SPI driver does not know what to do with this extra RX-fifo data that it did not ask for with its SPI clock, &lt;STRONG&gt;so it hangs&lt;/STRONG&gt;. In my opinion this is a bug in the Linux SPI driver because this data is in the RX-fifo buffer before the driver asserts the SPI chip select requesting data, so this data was not asked for and should .&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Solution:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the low level SPI driver, just before the driver asserts the SPI chip select we are now &lt;SPAN style="text-decoration: underline;"&gt;clearing the entire RX-buffer&lt;/SPAN&gt;. next we assert the chip select, fire off the 32-SPI clocks and read the incoming 32-SPI bits. All good! We ran for over three days on 3-boards and had no issues. Yahoo!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:18:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417317#M62756</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2015-11-23T16:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Weird SPI behavior on iMx6 running 3.14 Linux kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417318#M62757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share your changes in a patch format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 17:04:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Weird-SPI-behavior-on-iMx6-running-3-14-Linux-kernel/m-p/417318#M62757</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2017-08-23T17:04:45Z</dc:date>
    </item>
  </channel>
</rss>

