<?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>ColdFire/68K Microcontrollers and ProcessorsのトピックSPI linux driver: CS deasserting before the end of a message</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/SPI-linux-driver-CS-deasserting-before-the-end-of-a-message/m-p/147798#M3526</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;&lt;/P&gt;&lt;P&gt;I'm currently working on some code to interface a GPIO extender with a 5484 custom board running a Linux provided by Freescale (LTIB). I'm using spidev driver but got some issues to make it work properly. Indeed when I'm sending N bytes to the SPI and monirtoring the signals on an oscilloscope I can see the following :&lt;/P&gt;&lt;P&gt;- The N-1 first bytes are sent one after the other with CS asserted. SPI clock is ticking&lt;/P&gt;&lt;P&gt;- CS gets deasserted during a few µs. No clock&lt;/P&gt;&lt;P&gt;- The last byte is then sent with CS asserted and SPI clock ticking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is quite a problem for me as the GPIO chip interprets the CS deassertion as the end of the current message so that the chip sees one N-1 bytes long message and a second one of one byte.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running the example provided by LTIB (SDI and SDO tied together to write and read back the message) with spi_test, I can see the same behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my code, I'm initializing a spi_ioc_transfer with the cs_change = 0 so that the deassertion of CS should not happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know where this behaviour comes from and how to avoid CS from being deselected in the middle of a message ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you a lot !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2009 21:43:11 GMT</pubDate>
    <dc:creator>AlexisVDB</dc:creator>
    <dc:date>2009-10-19T21:43:11Z</dc:date>
    <item>
      <title>SPI linux driver: CS deasserting before the end of a message</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/SPI-linux-driver-CS-deasserting-before-the-end-of-a-message/m-p/147798#M3526</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;&lt;/P&gt;&lt;P&gt;I'm currently working on some code to interface a GPIO extender with a 5484 custom board running a Linux provided by Freescale (LTIB). I'm using spidev driver but got some issues to make it work properly. Indeed when I'm sending N bytes to the SPI and monirtoring the signals on an oscilloscope I can see the following :&lt;/P&gt;&lt;P&gt;- The N-1 first bytes are sent one after the other with CS asserted. SPI clock is ticking&lt;/P&gt;&lt;P&gt;- CS gets deasserted during a few µs. No clock&lt;/P&gt;&lt;P&gt;- The last byte is then sent with CS asserted and SPI clock ticking&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is quite a problem for me as the GPIO chip interprets the CS deassertion as the end of the current message so that the chip sees one N-1 bytes long message and a second one of one byte.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running the example provided by LTIB (SDI and SDO tied together to write and read back the message) with spi_test, I can see the same behaviour.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my code, I'm initializing a spi_ioc_transfer with the cs_change = 0 so that the deassertion of CS should not happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know where this behaviour comes from and how to avoid CS from being deselected in the middle of a message ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you a lot !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 21:43:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/SPI-linux-driver-CS-deasserting-before-the-end-of-a-message/m-p/147798#M3526</guid>
      <dc:creator>AlexisVDB</dc:creator>
      <dc:date>2009-10-19T21:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPI linux driver: CS deasserting before the end of a message</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/SPI-linux-driver-CS-deasserting-before-the-end-of-a-message/m-p/147799#M3527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello !&lt;/P&gt;&lt;P&gt;I guess&amp;nbsp;you are using the 2.6.25 Linux version.&lt;/P&gt;&lt;P&gt;The "Device Errata" of this processor (MCF5485) says that&amp;nbsp;the dspi presents the described problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to solve it, but I had others tasks to do and I had to leave it. Now I am recovering this task again.&lt;/P&gt;&lt;P&gt;I opened a post called "Help with DSPI on MCF5485" in this forum. You can find info there&amp;nbsp;that could be useful, although the device doesn't work properly yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2009 00:19:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/SPI-linux-driver-CS-deasserting-before-the-end-of-a-message/m-p/147799#M3527</guid>
      <dc:creator>raulen</dc:creator>
      <dc:date>2009-12-12T00:19:17Z</dc:date>
    </item>
  </channel>
</rss>

