<?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: SDMA data corrupt under CPU load</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583156#M200178</link>
    <description>&lt;P&gt;Hi Sanket,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that explanation sounds reasonable enough. Are there any mitigation steps I can try to avoid this, ensure that checksum errors doesn't happen, meaning preventing any influence on SPI data, or is this something we have to live with?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 11:54:27 GMT</pubDate>
    <dc:creator>tarik-dzananovic-sn</dc:creator>
    <dc:date>2023-01-16T11:54:27Z</dc:date>
    <item>
      <title>SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571766#M198931</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;If somebody could help me with following problem.&lt;BR /&gt;&lt;BR /&gt;We are using iMX8M Nano Quad Core as our main board processor.&lt;BR /&gt;It has running linux version: imx_5.4.70_2.3.0.&lt;BR /&gt;&lt;BR /&gt;After running for indefinite period of time we can see that our SPI channels (ecspi1 and&amp;nbsp;ecspi2) receive corrupt RX data (Either overwritten or shifted, it fails checksum check). If we put CPU under load (simply by running linux "yes" command) we can see errors occur more often.&lt;BR /&gt;&lt;BR /&gt;For experimental use we have also tried updating our linux kernel to imx_5.15.77_2.1.0 but we can still see the error. Since it affects both SPI channels, and when adding logs to our kernel drivers we can see that it receives corrupt data after calling spi_sync method, we are thinking that SDMA somehow corrupts the data. Did you had any similar situation, or you suspect what could possibly be wrong?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 08:13:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571766#M198931</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2022-12-19T08:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571806#M198934</link>
      <description>&lt;P&gt;Hi Tarik,&lt;/P&gt;&lt;P&gt;maybe you hit the same problem I suffer from on the i.MX6ULL. I also have SPI problems but they manifest in SPI timeout messages (on newer kernels). After some investigation I came to the following findings:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SPI problems can arise when multiple peripherals are used simultaneously&lt;UL&gt;&lt;LI&gt;I didn't test whether this (also) depends on the CPU load&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I only saw these problems on SPI, but never on other peripherals (e.g. UART)&lt;/LI&gt;&lt;LI&gt;Debugging into the "SPI timeout" messages showed that the ECSPI_CTRL and ECSPI_CONFIG registers often had an unexpected content.&lt;/LI&gt;&lt;LI&gt;I had also corrupted RX data:&lt;UL&gt;&lt;LI&gt;There were superfluous zeroes "inserted" into the RX buffer. At the end the transfer, some (correct) bytes were left in the RX FIFO&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I tested with SDMA and also without SDMA, but the problem never really disappeared.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;From my analyses I came to the conclusion that under "load conditions" single accesses the the SPI registers are not executed:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;write accesses are sometimes ignored (SPI register stays at the previous value)&lt;/LI&gt;&lt;LI&gt;single read accesses return zero (although the register/FIFO contains a non-zero value)&lt;UL&gt;&lt;LI&gt;RX FIFO count does not decrement in this case&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am highly interested whether you have the same behavior on i.MX8. For my use case I was program "workarounds" by modifying the Linux driver and the SDMA firmware (but with some loss of performance).&lt;/P&gt;&lt;P&gt;regards,&lt;BR /&gt;Christian&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 08:59:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571806#M198934</guid>
      <dc:creator>ceggers</dc:creator>
      <dc:date>2022-12-19T08:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571938#M198947</link>
      <description>&lt;P&gt;Hi Christian,&lt;BR /&gt;&lt;BR /&gt;First of all thanks for your reply. Our problems seem similar, but am not quite sure that they are the same.&lt;BR /&gt;&lt;BR /&gt;Yes there are multiple peripherals connected (3 UARTS, 1st one for serial console, when connected, 2nd for programming of auxiliary processor when fw update is needed, 3rd one not used actively). Also haven't seen issues on UART (but is not as frequently used, nor essential like SPI), so can't say for sure there are no problems but we haven't seen anything that would cause our attention.&lt;BR /&gt;&lt;BR /&gt;I have never received any errors related to SPI timeout or similar, it always returned success, but data under certain conditions (mentioned in previous post) get corrupt. SPI statistics structure under spi_device looks completely regular. All of the data for statistics (messages, transfers, timedout...) seems OK. As for SPI rx data, there could be zeros, but also some random byte overwrites very huge chunk of buffer. For example here how it looks like:&lt;BR /&gt;&lt;BR /&gt;Valid SPI RX buffer:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;80 00 01 01 02 00 00 00 00 78 00 FB 97 FF 17 FF FF FF FF 0A 00 07 00 00 00 00 00 78 0A 83 02 3E 03 46 03 06 00 0D 00 08 00 00 00 F8 05 00 00 00 00 0A 00 09 00 0A 00 F7 05 A9 02 0C 0C F8 0B B4 02 D5 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 64 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 52&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;We can see we have some header, some useful data and checksum bytes at the end.&lt;BR /&gt;&lt;BR /&gt;Examples of Invalid RX buffers have following output:&lt;BR /&gt;&lt;BR /&gt;Example a) - Random byte 7B overwrites correct data and data shift&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 84 00 01 07 02 00 00 00 00 7C 00 08 11 00 00 06 46 00 00 75 D6 D6 00 E4 02 5E E1 01 00 A4 00 15 DF 1A 00 D4 05 25 7E 02 00 34 00 16 C9 F5 03 3C 01 00 00 00 00 64 02 F5 02 1E 00 A4 00 BB 0B 07 00 5C 02 7E 12 00 00 EC 00 00 00 00 00 00 00 58 5A 1B 00 59 5A 1B 00 0C 8C 00 00 05 46 00 00 BF F7 AB 00 DE 1A 00 00 09 00 00 00 06 46 00 00 C3 40 36 00 06 46 00 00 C1 40 36 00 0B 3B 02 00 AE 1E 00 00 AA 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example b) - Zeros overwrites correct data and data shift&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 &lt;FONT color="#FF0000"&gt;80&lt;/FONT&gt; 00 01 01 02 00 00 00 00 78 00 f3 f7 ff 1f ff ff ff ff 09 00 06 00 00 00 00 00 7b 0a 77 02 3b 03 4a 03 06 00 08 00 0c 00 00 00 f6 05 06 00 12 0b 03 00 06 00 0a 00 ec 05 b0 02 09 0c fb 0b 52 06 d8 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 64 00 00 00 01 00 64 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;BR /&gt;&lt;BR /&gt;So, we can see that data are shifted and sometimes we have random byte that overwrites our buffer (in this example it is 7B) but there is always different byte written.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 13:46:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571938#M198947</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2022-12-19T13:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571972#M198954</link>
      <description>&lt;P&gt;Hi Tarik,&lt;/P&gt;&lt;P&gt;thanks for providing examples of the corrupted data.&lt;/P&gt;&lt;P&gt;It looks like your problem is different from my one, because I had only single individual zero bytes inserted in the RX buffer (no groups of many bytes / non-zero values like in your examples). The "SPI Timeout" messages I got (in the kernel log) are only visible in kernels &amp;gt;= 5.10 if I remember correctly, as older kernels don't implement these error messages.&lt;/P&gt;&lt;P&gt;Anyhow, for further analysis I would recommend to check (e.g. debug messages) whether ECSPIx_CONFIG, ECSPIx_CTRL and ECSPIx_TESTREG contain the correct values before/after each transfer. The FIFO counts in TESTREG should be zero before/after each transfer.&lt;/P&gt;&lt;P&gt;regards,&lt;BR /&gt;Christian&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 14:56:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1571972#M198954</guid>
      <dc:creator>ceggers</dc:creator>
      <dc:date>2022-12-19T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1576939#M199471</link>
      <description>&lt;DIV&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183598"&gt;@tarik-dzananovic-sn&lt;/a&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I hope you are doing well.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Please accept my apologies for delayed answer.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;One can check the transfer type is 7 ["MCU domain CSPI"] in the device tree.&lt;/DIV&gt;
&lt;DIV&gt;=&amp;gt;dmas = &amp;lt;&amp;amp;sdma&amp;nbsp;x 7 x&amp;gt;;&lt;/DIV&gt;
&lt;DIV&gt;This change may help you in&amp;nbsp;case of data corruption.&lt;/DIV&gt;
&lt;DIV&gt;Please refer for more information&amp;nbsp;&lt;A href="https://www.kernel.org/doc/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt" target="_blank" rel="noopener" data-saferedirecturl="https://www.google.com/url?q=https://www.kernel.org/doc/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt&amp;amp;source=gmail&amp;amp;ust=1672903475186000&amp;amp;usg=AOvVaw3B9prtxm0XONQQ24gq4yWU"&gt;fsl-imx-sdma.txt&lt;/A&gt;.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;We would also suggest&amp;nbsp;you go through once from known limitations of the chip and given workarounds.&lt;/DIV&gt;
&lt;DIV&gt;ERR009535,&amp;nbsp;ERR009606 and&amp;nbsp;ERR009165 from Errata&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/errata/IMX8MN_0N14Y.pdf" target="_blank" rel="noopener" data-saferedirecturl="https://www.google.com/url?q=https://www.nxp.com/docs/en/errata/IMX8MN_0N14Y.pdf&amp;amp;source=gmail&amp;amp;ust=1672903475186000&amp;amp;usg=AOvVaw3u-pZ9nrMljkGCAFYrHyYR"&gt;IMX8MN_0N14Y.PDF&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards&lt;/DIV&gt;
&lt;DIV&gt;Sanket Parekh&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Jan 2023 08:02:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1576939#M199471</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2023-01-04T08:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1579063#M199749</link>
      <description>&lt;P&gt;Hi thanks, sorry for my late reply, was out on Vacation.&lt;BR /&gt;&lt;BR /&gt;I will try things you suggested, and will let you know as soon as I have some results.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 07:30:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1579063#M199749</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2023-01-09T07:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1580314#M199867</link>
      <description>&lt;P&gt;Hi Sanket,&lt;BR /&gt;&lt;BR /&gt;I have looked at Errata and device tree configuration (our DMA was set to 7 for ECSPI1 as expected). All of the values in registers seem to have expected values.&lt;BR /&gt;&lt;BR /&gt;To mention again that this issues happens under heavy CPU load and it happens sporadically (So it is not something that puts system in bad state) but we are still wondering why these data get corrupt (and who corrupts them). Have also tried to check (and even change) ECSPI1 registers that Christian mentioned but still all of them look in order. Except that sometimes RX register in test read has value different then 0 in cases buffer gets corrupt. For example if last n bytes of our SPI message were this corrupt B7 byte, then test read would also read B7 from ECSPI1 Rx register.&lt;BR /&gt;SPI clock is set to 6.25 MHz and we are polling data every 5 ms. Have also tried to change this values as well, but it doesn't help.&lt;BR /&gt;&lt;BR /&gt;So my assumption would be that under heavy load, our SPI driver can't catch up (can't acquire CPU time) and polling would be delayed, that would make sense to me. But what doesn't make sense is this occasional data corruption (specially since we are using DMA) Who could corrupt this data?&lt;BR /&gt;&lt;BR /&gt;Just a note after looking at the data, it does seem that our receive buffer is always shifted (when data is corrupt of course). So there is always part of data we are expecting and part is not-useful (garbage) data.&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 21:36:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1580314#M199867</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2023-01-10T21:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1582289#M200067</link>
      <description>&lt;P&gt;Hi Tarik,&lt;/P&gt;&lt;P&gt;when testing without (S)DMA, ECSPIx_CONREG::SMC should be zero, that means that the SPI controller is operated in "stop-and-go" mode. A (larger) transfer is divided into chunks of FIFO size. After filling the TX FIFO by the CPU, the transfer is started by setting ECSPIx_CONREG::XCH to 1. After the transfer is completed, the CPU reads the received data from the RX FIFO (the controller doesn't transfer any data at this time).&lt;/P&gt;&lt;P&gt;During my own investigations in the past, I checked ECSPIx_TESTREG::RXCNT after each read from ECSPIx_RXDATA. In case of the "inserted RX bytes error", I recognized that RXCNT didn't decrease for those reads. That means, a read from ECSPIx_RXDATA returned a wrong (zero in my case) value and RXCNT wasn't decremented by one. With this finding I was able to develop counteractive measures in the ecspi driver and in the SDMA firmware (checking RXCNT after each read of RXDATA and read RXDATA again if RXCNT didn't decrease).&lt;/P&gt;&lt;P&gt;Maybe you want to check whether the same happens on your setup.&lt;/P&gt;&lt;P&gt;regards,&lt;BR /&gt;Christian&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 08:22:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1582289#M200067</guid>
      <dc:creator>ceggers</dc:creator>
      <dc:date>2023-01-13T08:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1582479#M200099</link>
      <description>&lt;P&gt;Thanks Christian,&lt;/P&gt;&lt;P&gt;as I remember all of my registers I was checking (Conreg, ConfigReg, DMAReg, StatReg, TestReg) had normal(expected) values when this error occurs, but will check once more and will let you know if I find anything suspicious.&lt;/P&gt;&lt;P&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 13:13:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1582479#M200099</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2023-01-13T13:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583044#M200158</link>
      <description>&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;Complete TESTREG has value 0 both before and after calling spi_sync function form my SPI kernel driver.&lt;BR /&gt;Only thing worth nothing, is that if I add dev_err kernel prints inside my driver method (to check TESTREG value periodically)&amp;nbsp; I can see increase in my SPI checksum errors (I don't even have to put CPU under load). Not sure is that expected because I assume print takes CPU time causing wrong data in my SPI driver?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 09:13:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583044#M200158</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2023-01-16T09:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583122#M200171</link>
      <description>&lt;DIV&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/183598"&gt;@tarik-dzananovic-sn&lt;/a&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I hope you are doing well&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Please find the answer below.&lt;/DIV&gt;
&lt;DIV&gt;Yes, I agree with you. Also there are chances of data corruption due to the below reason.&lt;/DIV&gt;
&lt;DIV&gt;As we know, using DMA, the data goes from peripheral to memory using bus and without using DMA the data goes from peripheral to CPU and from CPU to memory using bus. There are chances that when the device is sending data slowly or for any reason the bus becomes ideal, then the CPU&amp;nbsp;might&amp;nbsp;try to use that bus as the CPU is under heavy load. If it succeeds&amp;nbsp;then the chances of data corruption increases.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards&lt;/DIV&gt;
&lt;DIV&gt;Sanket Parekh&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 10:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583122#M200171</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2023-01-16T10:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: SDMA data corrupt under CPU load</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583156#M200178</link>
      <description>&lt;P&gt;Hi Sanket,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes that explanation sounds reasonable enough. Are there any mitigation steps I can try to avoid this, ensure that checksum errors doesn't happen, meaning preventing any influence on SPI data, or is this something we have to live with?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;//Tarik&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 11:54:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SDMA-data-corrupt-under-CPU-load/m-p/1583156#M200178</guid>
      <dc:creator>tarik-dzananovic-sn</dc:creator>
      <dc:date>2023-01-16T11:54:27Z</dc:date>
    </item>
  </channel>
</rss>

