<?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 Re: Hard/Bus Fault while running AN12255SW flash_remap_test in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2033479#M33295</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/244267"&gt;@schafbo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out!&lt;/P&gt;
&lt;P&gt;It seems that are you running the demo located in AN1225SW&amp;gt; SW\src\boards\evkmimxrt1060\use_case\flash_remap_test\nor\polling_transfer\, correct ?&lt;/P&gt;
&lt;P&gt;If yes, which scatter (icf) file did you selected? Below an example for more context.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_0-1737672371654.png" style="width: 485px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/321140i25FB62C2E397B899/image-dimensions/485x266?v=v2" width="485" height="266" role="button" title="diego_charles_0-1737672371654.png" alt="diego_charles_0-1737672371654.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is expected that the AN12255 SW was working well when it was released, but this occurred&amp;nbsp; released sometime ago (2018), I do not know if latest IAR and compiler settings and version are affecting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2025 22:55:02 GMT</pubDate>
    <dc:creator>diego_charles</dc:creator>
    <dc:date>2025-01-23T22:55:02Z</dc:date>
    <item>
      <title>Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032504#M33273</link>
      <description>&lt;P&gt;I'm having trouble running the flash remap test from&amp;nbsp;AN12255SW. Once I finish initializing FlexSPI, I receive a bus fault BFARVALID (7) BusFault Address Register (BFAR) valid flag and PRECISERR (1) Precise data bus error in addition to a forced hard fault.&lt;/P&gt;&lt;P&gt;I needed to modify the clock configuration, otherwise the debugger would stop working - I believe this config is correct as I've used it with another flexspi flash example and my debugger remained active afterwards.&lt;/P&gt;&lt;P&gt;I'm not sure if maybe I should be setting additional options for the AHB buffer?&lt;/P&gt;&lt;P&gt;Also in the flexspi flash example, the flexspi flash driver code is run out of RAM instead of Flash using a linker script, but it doesn't look like that is needed here?&lt;/P&gt;&lt;P&gt;int main {&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;uint32_t&lt;/SPAN&gt;&lt;SPAN&gt; i = 0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;flexspi_config_t&lt;/SPAN&gt;&lt;SPAN&gt; config;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;status_t&lt;/SPAN&gt;&lt;SPAN&gt; status;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;uint8_t&lt;/SPAN&gt;&lt;SPAN&gt; vendorID = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;BOARD_ConfigMPU();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;BOARD_InitPins();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;BOARD_BootClockRUN();&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;BOARD_InitDebugConsole();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CLOCK_SetMux(&lt;/SPAN&gt;&lt;SPAN&gt;kCLOCK_FlexspiMux&lt;/SPAN&gt;&lt;SPAN&gt;, 0x2); &lt;/SPAN&gt;&lt;SPAN&gt;/* Choose PLL2 PFD2 clock as &lt;/SPAN&gt;&lt;SPAN&gt;flexspi&lt;/SPAN&gt;&lt;SPAN&gt; source clock. 396M */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CLOCK_SetDiv(&lt;/SPAN&gt;&lt;SPAN&gt;kCLOCK_FlexspiDiv&lt;/SPAN&gt;&lt;SPAN&gt;, 2); &lt;/SPAN&gt;&lt;SPAN&gt;/* &lt;/SPAN&gt;&lt;SPAN&gt;flexspi&lt;/SPAN&gt;&lt;SPAN&gt; clock 133M. */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;SCB_DisableDCache&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Flash remap registers not used at this point&lt;BR /&gt;&lt;SPAN&gt;//IOMUXC_GPR-&amp;gt;GPR30 = 0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;//IOMUXC_GPR-&amp;gt;GPR31 = 0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;//IOMUXC_GPR-&amp;gt;GPR32 = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PRINTF(&lt;/SPAN&gt;&lt;SPAN&gt;"\r\nFLEXSPI example started!\r\n"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*Get FLEXSPI default settings and configure the &lt;/SPAN&gt;&lt;SPAN&gt;flexspi&lt;/SPAN&gt;&lt;SPAN&gt;. */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;FLEXSPI_GetDefaultConfig(&amp;amp;config);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*Set AHB buffer size for reading data through AHB bus. */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;config.&lt;/SPAN&gt;&lt;SPAN&gt;ahbConfig&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;enableAHBPrefetch&lt;/SPAN&gt;&lt;SPAN&gt; = true;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;config.&lt;/SPAN&gt;&lt;SPAN&gt;rxSampleClock&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;kFLEXSPI_ReadSampleClkLoopbackFromDqsPad&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;FLEXSPI_Init(EXAMPLE_FLEXSPI, &amp;amp;config);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// BUS FAULT OCCURS HERE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/* Configure flash settings according to serial flash feature. */&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;FLEXSPI_SetFlashConfig(EXAMPLE_FLEXSPI, &amp;amp;deviceconfig, &lt;/SPAN&gt;&lt;SPAN&gt;kFLEXSPI_PortA1&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Jan 2025 16:55:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032504#M33273</guid>
      <dc:creator>schafbo</dc:creator>
      <dc:date>2025-01-22T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032506#M33274</link>
      <description>&lt;P&gt;I'm using an iMXRT1062.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 17:02:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032506#M33274</guid>
      <dc:creator>schafbo</dc:creator>
      <dc:date>2025-01-22T17:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032657#M33282</link>
      <description>&lt;P&gt;You _definitely_ need to be running out of RAM when calling FLEXSPI_Init() and FLEXSPI_SetFlashConfig(). IIRC, in between those two function calls, the FLEXSPI peripheral will have no LUT sequences, so it won't be able to read anything out of flash.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe try wrapping your main() function in AT_QUICKACCESS_SECTION_CODE() and see if that helps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if it's useful, here's how we did this in Mbed OS: &lt;A href="https://github.com/mbed-ce/mbed-os/blob/master/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_EVK/flash_api.c#L91" target="_blank"&gt;https://github.com/mbed-ce/mbed-os/blob/master/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT105x/TARGET_EVK/flash_api.c#L91&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 23:41:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2032657#M33282</guid>
      <dc:creator>MultipleMonomials</dc:creator>
      <dc:date>2025-01-22T23:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2033479#M33295</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/244267"&gt;@schafbo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out!&lt;/P&gt;
&lt;P&gt;It seems that are you running the demo located in AN1225SW&amp;gt; SW\src\boards\evkmimxrt1060\use_case\flash_remap_test\nor\polling_transfer\, correct ?&lt;/P&gt;
&lt;P&gt;If yes, which scatter (icf) file did you selected? Below an example for more context.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_0-1737672371654.png" style="width: 485px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/321140i25FB62C2E397B899/image-dimensions/485x266?v=v2" width="485" height="266" role="button" title="diego_charles_0-1737672371654.png" alt="diego_charles_0-1737672371654.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It is expected that the AN12255 SW was working well when it was released, but this occurred&amp;nbsp; released sometime ago (2018), I do not know if latest IAR and compiler settings and version are affecting.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diego&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 22:55:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2033479#M33295</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2025-01-23T22:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036191#M33336</link>
      <description>&lt;P&gt;Hello Diego,&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso and not IAR, is it required for using this example?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 15:31:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036191#M33336</guid>
      <dc:creator>schafbo</dc:creator>
      <dc:date>2025-01-30T15:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036193#M33337</link>
      <description>&lt;P&gt;Thank you. I placed the FlexSPI functions into RAM using a similar method to the 'flexspi_nor_polling' example and I no longer had hard faults. I'm thinking the linker for this example was set up a different way that would have done this for me, but I'm not sure how/if it can work with MCUXpresso.&lt;/P&gt;&lt;P&gt;The flash remap test uses the same drivers as the flex spi example (just adding the steps to set the GPR), so I pulled the code in to test it and the remap seemed to work just fine.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 15:38:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036193#M33337</guid>
      <dc:creator>schafbo</dc:creator>
      <dc:date>2025-01-30T15:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hard/Bus Fault while running AN12255SW flash_remap_test</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036194#M33338</link>
      <description>&lt;P&gt;How can I set the fuse bits as outlined in AN12255 section 3.2.1?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 15:39:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Bus-Fault-while-running-AN12255SW-flash-remap-test/m-p/2036194#M33338</guid>
      <dc:creator>schafbo</dc:creator>
      <dc:date>2025-01-30T15:39:58Z</dc:date>
    </item>
  </channel>
</rss>

