<?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のトピックRe: RT1176 FlexSPI2 XIP + ROM Flash API</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058222#M33685</link>
    <description>Note, our flash is MX25UM51345GXDI00 and it's on the primary pin group for flexspi2.</description>
    <pubDate>Sat, 08 Mar 2025 10:31:46 GMT</pubDate>
    <dc:creator>gobbo</dc:creator>
    <dc:date>2025-03-08T10:31:46Z</dc:date>
    <item>
      <title>RT1176 FlexSPI2 XIP + ROM Flash API</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058221#M33684</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;we have a iMXRT1176 with a MX25UM1345 attached to FlexSPI2, from which we do XIP.&lt;/P&gt;&lt;P&gt;I have been following this guide and have adapted the fsl_romapi example code as instructed.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs-Knowledge/RT1170-Octal-flash-enablement/ta-p/1498369" target="_blank"&gt;https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs-Knowledge/RT1170-Octal-flash-enablement/ta-p/1498369&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I *assume* FlexSPIInstance=2U is the correct value, but there is no documentation for this from what I can tell. Setting to 2U gives me a filled out nor config structure, so I assume this is correct. Furthermore, from single-stepping, I see that in the "cache clear" ROM API function call, we access 400D0000; which is the FlexSPI2 controller; and if i put in 1U we access 400CC000.&lt;/P&gt;&lt;P&gt;Do note that I run this code XIP; and I have set up the LUTS as shown in the tutorial.&lt;/P&gt;&lt;P&gt;A few differences appear.&lt;/P&gt;&lt;P&gt;1. I get 8 CMD and 8 Query pads back from the Getconfig call. This is strange to me, because we use the same chip as mentioned in the tutorial (" Successfully get FLEXSPI NOR configuration block with option_8bit").&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. I&amp;nbsp; hang on Page Erase 4 out of 5 times (roughly).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a hunch that this is related to the AHB (xip) / IP command interaction on FlexSPI2 interface. I assume this is thoroughly tested though?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 10:28:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058221#M33684</guid>
      <dc:creator>gobbo</dc:creator>
      <dc:date>2025-03-08T10:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: RT1176 FlexSPI2 XIP + ROM Flash API</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058222#M33685</link>
      <description>Note, our flash is MX25UM51345GXDI00 and it's on the primary pin group for flexspi2.</description>
      <pubDate>Sat, 08 Mar 2025 10:31:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058222#M33685</guid>
      <dc:creator>gobbo</dc:creator>
      <dc:date>2025-03-08T10:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: RT1176 FlexSPI2 XIP + ROM Flash API</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058226#M33687</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to add a couple of findings.&lt;/P&gt;&lt;P&gt;The first finding is obvious. Interrupts absolutely must be off when executing flash IP commands. This makes sense. We even store the interrupt vectors on the flash; so I can understand why this would cause problems.&lt;/P&gt;&lt;P&gt;Trick #1 then is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;__asm("cpsid i");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... immediately at boot (for this instance -- so the plan is to generally disable it).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How-ever, this is strangely not insufficient to avoid hangs when erasing or writing. The second requirement, and this is where I am fully stumped; is to &lt;STRONG&gt;disable AHB prefetching&lt;/STRONG&gt; on the FlexSPI module after calling the NOR Initialization code:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt; status = ROM_FLEXSPI_NorFlash_Init(flexspi_instance, &amp;amp;g_nor_config);&lt;BR /&gt;// disable ahb prefetching here to avoid hangs&lt;BR /&gt;base&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;AHBCR&lt;/SPAN&gt;&lt;SPAN&gt; |= FLEXSPI_AHBCR_PREFETCHEN_MASK;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;base&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;AHBCR&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;= ~(FLEXSPI_AHBCR_PREFETCHEN_MASK);&lt;BR /&gt;&lt;BR /&gt;... &lt;BR /&gt;status = ROM_FLEXSPI_NorFlash_Erase(flexspi_instance, &amp;amp;g_nor_config, 0x0F0000, 4096);&lt;BR /&gt;...etc.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;where base is just a pointer to FLEXSPI2 module interface.&lt;BR /&gt;&lt;BR /&gt;So far I have re-run this code 10 times and it does not fail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this approach seems fragile; and I absolutely must understand *why* this works. I can get a vague sense of the problem; since FLEXSPI module will read more data and put it into AHB prefetch buffers, the IP commands interfering with this data somehow makes sense.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Is this a known errata?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 11:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2058226#M33687</guid>
      <dc:creator>gobbo</dc:creator>
      <dc:date>2025-03-08T11:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: RT1176 FlexSPI2 XIP + ROM Flash API</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2059856#M33726</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/191844"&gt;@gobbo&lt;/a&gt;,&lt;BR /&gt;The last mentioned could be the issue, since the AHB and the IP commands share the CM7 bus:&lt;/P&gt;
&lt;DIV id="tinyMceEditorHabib_MS_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditor_8d4eae05e020bHabib_MS_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="F_i.JPG" style="width: 920px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/327571i60BE3139B8204B69/image-size/large?v=v2&amp;amp;px=999" role="button" title="F_i.JPG" alt="F_i.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;So, there could be a collision between them.&lt;BR /&gt;BR&lt;BR /&gt;Habib.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 22:11:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI2-XIP-ROM-Flash-API/m-p/2059856#M33726</guid>
      <dc:creator>Habib_MS</dc:creator>
      <dc:date>2025-03-11T22:11:43Z</dc:date>
    </item>
  </channel>
</rss>

