<?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 RT Crossover MCUs中的主题 RT1060 - use of OCRAM breaks fatfs example</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952771#M4341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a FreeRTOS project and plan to use all 1MB of the internal RAM on the RT1060. I've noticed that there is a change in the code behavior based off the location I store the global data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, currently I'm working with the RT1060EVK board with a uSD card and FatFS. I import the example project: evkmimxrt1060_sdcard_fatfs_freertos and change only one setting, which breaks the example. Out of the box, it run as expected. After moving the global data into the OCRAM (from DTCM), the application no longer writes to the SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250i94FDBEADCB1BD7D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain to me what I'm missing, and why changing this from SRAM_OC to SRAM_DTC fixes some issues in the SD initialization.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: the output from the example when it fails is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SDCARD fatfs freertos example.&lt;/P&gt;&lt;P&gt;Card inserted.&lt;/P&gt;&lt;P&gt;Make file system......The time may be long if the card capacity is big.&lt;BR /&gt;Make file system failed.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example I am running is from SDK version 2.6.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Oct 2019 03:16:54 GMT</pubDate>
    <dc:creator>tmeyer1</dc:creator>
    <dc:date>2019-10-07T03:16:54Z</dc:date>
    <item>
      <title>RT1060 - use of OCRAM breaks fatfs example</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952771#M4341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on a FreeRTOS project and plan to use all 1MB of the internal RAM on the RT1060. I've noticed that there is a change in the code behavior based off the location I store the global data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, currently I'm working with the RT1060EVK board with a uSD card and FatFS. I import the example project: evkmimxrt1060_sdcard_fatfs_freertos and change only one setting, which breaks the example. Out of the box, it run as expected. After moving the global data into the OCRAM (from DTCM), the application no longer writes to the SD card.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/250i94FDBEADCB1BD7D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain to me what I'm missing, and why changing this from SRAM_OC to SRAM_DTC fixes some issues in the SD initialization.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: the output from the example when it fails is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;SDCARD fatfs freertos example.&lt;/P&gt;&lt;P&gt;Card inserted.&lt;/P&gt;&lt;P&gt;Make file system......The time may be long if the card capacity is big.&lt;BR /&gt;Make file system failed.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example I am running is from SDK version 2.6.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2019 03:16:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952771#M4341</guid>
      <dc:creator>tmeyer1</dc:creator>
      <dc:date>2019-10-07T03:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: RT1060 - use of OCRAM breaks fatfs example</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952772#M4342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim-san&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you change MPU setting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Default Setting, OCRAM area is set to &lt;STRONG&gt;not shareable&lt;/STRONG&gt; by BOARD_ConfigMPU.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So transfer using DMA does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */&lt;BR /&gt; MPU-&amp;gt;RBAR = ARM_MPU_RBAR(6, 0x20200000U);&lt;BR /&gt; MPU-&amp;gt;RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, &lt;STRONG&gt;0&lt;/STRONG&gt;, 1, 1, 0, ARM_MPU_REGION_SIZE_512KB);&lt;/P&gt;&lt;P&gt;/* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */&lt;BR /&gt; MPU-&amp;gt;RBAR = ARM_MPU_RBAR(7, 0x20280000U);&lt;BR /&gt; MPU-&amp;gt;RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, &lt;STRONG&gt;0&lt;/STRONG&gt;, 1, 1, 0, ARM_MPU_REGION_SIZE_256KB);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;T.Kashiwagi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 02:02:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952772#M4342</guid>
      <dc:creator>Takashi_Kashiwagi</dc:creator>
      <dc:date>2019-10-09T02:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: RT1060 - use of OCRAM breaks fatfs example</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952773#M4343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;This is because OCRAM default is cacheable. Since some SD control block in RAM is shared by SD peripheral and MCU, cache function cause data missing. When MCU write something to the block, it only write to cache actually. Peripheral can get it. When peripheral write something to the block, MCU also don't know. Because it only read from cache actually.&lt;/P&gt;&lt;P&gt;TCM is not cacheable. So, it hasn't this problem. For i.MXRT, shareable means non-cacheable by default. T.Kashiwagi's method can resolve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 07:41:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952773#M4343</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-10-09T07:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: RT1060 - use of OCRAM breaks fatfs example</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952774#M4344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect, thanks so much for pointing that out. It all makes sense to me know.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 19:17:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1060-use-of-OCRAM-breaks-fatfs-example/m-p/952774#M4344</guid>
      <dc:creator>tmeyer1</dc:creator>
      <dc:date>2019-10-10T19:17:41Z</dc:date>
    </item>
  </channel>
</rss>

