<?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>topic code can not get data from no_cacheable ram if source code runs in ITCM in S32K</title>
    <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2030624#M45272</link>
    <description>&lt;P&gt;hello NXP experts:&lt;/P&gt;&lt;P&gt;I met a question about RAM access.&lt;/P&gt;&lt;P&gt;I modify the link file and locate all the source code in ITCM (all the hex is located from 0x00000000) and I take use of SPI and DMA to communicate with the external device.&lt;/P&gt;&lt;P&gt;when I set the value in global ram and trigger DMA transmit, there is no data in MTSR PIN， if I set a breakpoint after RAM data setting but before DMA transfer. there will be data in MTSR.&lt;/P&gt;&lt;P&gt;so I guess the root cause may be the ram refresh because ITCM runs high frequency than SRAM .&lt;/P&gt;&lt;P&gt;you can check the two pic below, if I go from breakpoint 1 to breakpoint 2 ,there is no contents in the MTSR(orange color)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 713px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320372i13382B4B7C2CBF9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320373iD9AAE73741F67CCD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can check the two pictures below and if I go from breakpoint 1 to&amp;nbsp;breakpoint 2 to&amp;nbsp;breakpoint 3(I just do a stop between breakpoint 1 and breakpoint 3) .&lt;/P&gt;&lt;P&gt;there is contents in the MTSR(orange color).&lt;/P&gt;&lt;P&gt;do you have any solution for this problem .thanks a lot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320375i7519B859E864E15F/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320377i2C3BCCFDFA7065BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2025 11:15:43 GMT</pubDate>
    <dc:creator>yin_qiu</dc:creator>
    <dc:date>2025-01-20T11:15:43Z</dc:date>
    <item>
      <title>code can not get data from no_cacheable ram if source code runs in ITCM</title>
      <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2030624#M45272</link>
      <description>&lt;P&gt;hello NXP experts:&lt;/P&gt;&lt;P&gt;I met a question about RAM access.&lt;/P&gt;&lt;P&gt;I modify the link file and locate all the source code in ITCM (all the hex is located from 0x00000000) and I take use of SPI and DMA to communicate with the external device.&lt;/P&gt;&lt;P&gt;when I set the value in global ram and trigger DMA transmit, there is no data in MTSR PIN， if I set a breakpoint after RAM data setting but before DMA transfer. there will be data in MTSR.&lt;/P&gt;&lt;P&gt;so I guess the root cause may be the ram refresh because ITCM runs high frequency than SRAM .&lt;/P&gt;&lt;P&gt;you can check the two pic below, if I go from breakpoint 1 to breakpoint 2 ,there is no contents in the MTSR(orange color)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 713px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320372i13382B4B7C2CBF9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320373iD9AAE73741F67CCD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can check the two pictures below and if I go from breakpoint 1 to&amp;nbsp;breakpoint 2 to&amp;nbsp;breakpoint 3(I just do a stop between breakpoint 1 and breakpoint 3) .&lt;/P&gt;&lt;P&gt;there is contents in the MTSR(orange color).&lt;/P&gt;&lt;P&gt;do you have any solution for this problem .thanks a lot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320375i7519B859E864E15F/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/320377i2C3BCCFDFA7065BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 11:15:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2030624#M45272</guid>
      <dc:creator>yin_qiu</dc:creator>
      <dc:date>2025-01-20T11:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: code can not get data from no_cacheable ram if source code runs in ITCM</title>
      <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2031515#M45322</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;seems the buffer is simple not placed in non cacheable area. If not, flush a cache by calling Cache Clean function before SPI transmit.&lt;/P&gt;
&lt;P&gt;BR, Petr&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 14:27:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2031515#M45322</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2025-01-21T14:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: code can not get data from no_cacheable ram if source code runs in ITCM</title>
      <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2037692#M45607</link>
      <description>&lt;P&gt;hi PetrS：&lt;/P&gt;&lt;P&gt;I set the Tx buffer and Rx buffer in the no cacheable ram, it works OK if the source code runs in PFlash&lt;/P&gt;&lt;P&gt;but if I set the code run in ITCM by modify the link file, the SPI seems can not transfer the correct data in MTSR.&lt;/P&gt;&lt;P&gt;I try to solve this problem by init the Tx buffer by data segment rather than bss segment and it works OK because there is no need to&amp;nbsp; init the tx buffer before calling "SPI_SetupEB".&lt;/P&gt;&lt;P&gt;but I still meet a question for getting data in Rx Buffer. sometimes ,I can not get the correct data from Rx buffer event if the contents in MRST pin is correct.(the contents in MRST is 1 but the data in Rx Buffer in 0, but correct 1 is get if a break point is set)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 12:33:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2037692#M45607</guid>
      <dc:creator>yin_qiu</dc:creator>
      <dc:date>2025-02-04T12:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: code can not get data from no_cacheable ram if source code runs in ITCM</title>
      <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2038289#M45630</link>
      <description>&lt;P&gt;hi PetrS:&lt;/P&gt;&lt;P&gt;in my current project, I disable the MPU function by disable&amp;nbsp; the data setting for "S32_MPU-&amp;gt;CTRL " in "system.c".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will it have any relationship with the current problem?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 06:35:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2038289#M45630</guid>
      <dc:creator>yin_qiu</dc:creator>
      <dc:date>2025-02-05T06:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: code can not get data from no_cacheable ram if source code runs in ITCM</title>
      <link>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2038391#M45634</link>
      <description>&lt;P&gt;hi PetrS:&lt;/P&gt;&lt;P&gt;I think I have solved this problem :&lt;/P&gt;&lt;P&gt;because I have to put all source code in RAM and ITCM and DTCM is not large enough to cover all the source code ,so I put some code in shareable ram. but it will report hard fault if instruction access in&amp;nbsp;shareable ram.&lt;/P&gt;&lt;P&gt;I tried to solve this hardfault problem by disable the MPU. but disable the MPU may have some effect on the other area for example no cacheable ram .&amp;nbsp;&lt;/P&gt;&lt;P&gt;now I try to enable MPU again but modify the&amp;nbsp;rasr register for&amp;nbsp;shareable ram and change the value from&amp;nbsp;0x130C0001UL to 0x030C0001UL&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 08:12:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/code-can-not-get-data-from-no-cacheable-ram-if-source-code-runs/m-p/2038391#M45634</guid>
      <dc:creator>yin_qiu</dc:creator>
      <dc:date>2025-02-05T08:12:09Z</dc:date>
    </item>
  </channel>
</rss>

