<?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: Two parallel SPI reader threads instability</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743590#M115693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for improving performance may be recommended to apply to NXP Professional Services:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE" title="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE"&gt;NXP Professional Services|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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Feb 2018 06:39:58 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2018-02-23T06:39:58Z</dc:date>
    <item>
      <title>Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743585#M115688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a C++ application on DART-6UL Linux, collecting data from two eCSPI SPI ports from camera sensors, one on each port. We Read from the SPI ports only, there a no write operations.There is a separate thread (running real-time priority (SCHED_RR)) for the data collection from each spi port.&lt;/P&gt;&lt;P&gt;The Linux kernel has been built and tested using both MORTY and PYRO Linux's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When reading only one port it runs great,&amp;nbsp;and the application can retrieve all data at the rate delivered from the sensor (ca 8 frames per second; each frame is ca 40Kb).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When&amp;nbsp;running two instances in parallel for the&amp;nbsp;ports the performance drops significantly.&lt;/P&gt;&lt;P&gt;We have tested using both the read() systemcall and ioctrl() (with the SPI_IOC_MESSAGE(1) macro) in the reader thread, however the performance is identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have suggestions to these issues:&lt;/P&gt;&lt;P&gt;- can any system/kernel tuning be performed to optimize to the&amp;nbsp;performance&lt;BR /&gt;- can you provide sample programs demonstrating how to obtain our required performance&lt;BR /&gt;- Are anyone&amp;nbsp;experiencing similar SPI problems ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2018 13:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743585#M115688</guid>
      <dc:creator>jangodborg</dc:creator>
      <dc:date>2018-01-22T13:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743586#M115689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try with nxp linux releases described on&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.nxp.com%2Fsupport%2Fdeveloper-resources%2Frun-time-software%2Fi.mx-developer-resources%2Fi.mx-6series-i.mx-7series-software-and-development-tool-resources%3AIMX_SW" rel="nofollow" target="_blank"&gt;https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6series-i.mx-7series-software-and-development-tool-resources:IMX_SW&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Usually performance drop happens due to internal bus limitation, so one can consider to&lt;/P&gt;&lt;P&gt;descrease bus loading (usage) from other modules.&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>Mon, 22 Jan 2018 23:45:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743586#M115689</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-01-22T23:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743587#M115690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Can you be a bit more specific as to which bus it can be? We would like to know what exactly is the bottleneck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even changing the design to another Soc may not solve the problem if it has the same bottleneck (and it is not a convenient option&amp;nbsp;in our project now).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any option to optimize, e.g. increasing the clock on that bus?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 08:34:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743587#M115690</guid>
      <dc:creator>jangodborg</dc:creator>
      <dc:date>2018-01-23T08:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743588#M115691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bus connections are quite complex and similar to i.MX6DQ described&lt;BR /&gt;on Figure 45-1. NIC-301 Bus System i.MX6DQ Reference Manual &lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Freference-manual%2FIMX6DQRM.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf&lt;/A&gt;&lt;BR /&gt;and I am afraid there is no way to find which bus exactly is bottleneck&lt;BR /&gt;(there are no tools to find it), just as estimation for measuring bus loading &lt;BR /&gt;one can try MMDC Profiling tool &lt;BR /&gt;&lt;A href="https://community.nxp.com/message/873372"&gt;https://community.nxp.com/message/873372&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;One can narrow down issue with running test without linux, using FreeRTOS :&lt;BR /&gt;Board Support Packages (7) &lt;BR /&gt;SDK2.2_iMX6UL_WIN(REV SDK2.2)&lt;BR /&gt;&lt;A href="http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-processors/i.mx-6-processors/i.mx-6ultralite-processor-low-power-secure-arm-cortex-a7-core:i.MX6UL?tab=Design_Tools_Tab"&gt;http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-processors/i.mx-6-processors/i.mx-6ultralite-processor-low-power-secure-arm-cortex-a7-core:i.MX6UL?tab=Design_Tools_Tab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 23:03:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743588#M115691</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-01-23T23:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743589#M115692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you possibly give some information about how to tune our system to improve&amp;nbsp;the performance of the two SPI threads, as to obtain an improved performance of the spi reader process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have experimented with bus speeds without good results. Please state possible other alternatives we can try (kernel parameter tuning or ? ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We really need some expert&amp;nbsp;advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you.&lt;BR /&gt; Jan Godborg.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:15:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743589#M115692</guid>
      <dc:creator>jangodborg</dc:creator>
      <dc:date>2018-02-22T11:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743590#M115693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for improving performance may be recommended to apply to NXP Professional Services:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE" title="https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE"&gt;NXP Professional Services|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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 06:39:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743590#M115693</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-02-23T06:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Two parallel SPI reader threads instability</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743591#M115694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately there isn't a simple answer to where the bottleneck could be, however below are some suggestions base on our experience:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Verify the spi kernel driver is using DMA for transfers.&lt;/P&gt;&lt;P&gt;2. Run SPI at the max clock speed the camera supports.&lt;/P&gt;&lt;P&gt;3. If you know the max SPI clock speed of the camera and data packet length you should be able to roughly calculate the expected throughput per second. This should give you a rough estimation of what should be possible with 2 cameras attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. If possible you should try using one eCSPI port plus the SS pins to multiplex between the two camera. This should reduce context switching of kernel driver instances.&lt;/P&gt;&lt;P&gt;5. From the application side you should reuse a pool of buffers and not allocate on demand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2018 11:22:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Two-parallel-SPI-reader-threads-instability/m-p/743591#M115694</guid>
      <dc:creator>mtx512</dc:creator>
      <dc:date>2018-02-23T11:22:37Z</dc:date>
    </item>
  </channel>
</rss>

