<?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のトピックIMX6 - SPI read more than 64 bytes form device</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-SPI-read-more-than-64-bytes-form-device/m-p/533414#M84827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are using IMX6 SOM with Debian&amp;nbsp; Linux version&amp;nbsp; 3.10.101-imx6,&lt;/P&gt;&lt;P&gt;where SPI device (ATMEL AT86RF233) is connected to. &lt;/P&gt;&lt;P&gt;We have encountered a problem while reading from the device more than 64 bytes via SPI.&lt;/P&gt;&lt;P&gt;Reading data of less or equals 64 bytes works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SPI reading process is as follows:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Interrupt function is invoked from SPI device via dedicated GPIO line.&lt;/LI&gt;&lt;LI&gt;The interrupt function performs asynchronous SPI read in the following order:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - prepare spi_message and spi_transfer structures and fill them with relevant data: spi_device , data tx, transfer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len , complete handler , … &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The read itself&amp;nbsp; is done by calling spi_async function &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The completion handler function is called and prints the read message, but trying to read more than 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bytes in one SPI transaction causes the read data to be corrupted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Do you have any idea for this behavior ? &lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Is there any limitations for &lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Is there (in Linux) any definition for the max size to be read via the SPI ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Thanks&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Rony Patel&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;SCR Dairy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jul 2016 13:53:05 GMT</pubDate>
    <dc:creator>ronypatel</dc:creator>
    <dc:date>2016-07-03T13:53:05Z</dc:date>
    <item>
      <title>IMX6 - SPI read more than 64 bytes form device</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/IMX6-SPI-read-more-than-64-bytes-form-device/m-p/533414#M84827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are using IMX6 SOM with Debian&amp;nbsp; Linux version&amp;nbsp; 3.10.101-imx6,&lt;/P&gt;&lt;P&gt;where SPI device (ATMEL AT86RF233) is connected to. &lt;/P&gt;&lt;P&gt;We have encountered a problem while reading from the device more than 64 bytes via SPI.&lt;/P&gt;&lt;P&gt;Reading data of less or equals 64 bytes works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SPI reading process is as follows:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Interrupt function is invoked from SPI device via dedicated GPIO line.&lt;/LI&gt;&lt;LI&gt;The interrupt function performs asynchronous SPI read in the following order:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - prepare spi_message and spi_transfer structures and fill them with relevant data: spi_device , data tx, transfer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len , complete handler , … &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The read itself&amp;nbsp; is done by calling spi_async function &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The completion handler function is called and prints the read message, but trying to read more than 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bytes in one SPI transaction causes the read data to be corrupted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Do you have any idea for this behavior ? &lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Is there any limitations for &lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Is there (in Linux) any definition for the max size to be read via the SPI ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Thanks&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;Rony Patel&lt;/P&gt;&lt;P style="margin-left: 18.0pt;"&gt;SCR Dairy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 13:53:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/IMX6-SPI-read-more-than-64-bytes-form-device/m-p/533414#M84827</guid>
      <dc:creator>ronypatel</dc:creator>
      <dc:date>2016-07-03T13:53:05Z</dc:date>
    </item>
  </channel>
</rss>

