<?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: RT1176 FlexSPI Config Tool Generated Init Code: Another Bug in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI-Config-Tool-Generated-Init-Code-Another-Bug/m-p/1736928#M27189</link>
    <description>&lt;P&gt;Well, this is not a &lt;SPAN&gt;technical&lt;/SPAN&gt; support request but a bug report. If someone from NXP see this, fix it please. Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 01:17:20 GMT</pubDate>
    <dc:creator>zylalx1</dc:creator>
    <dc:date>2023-10-11T01:17:20Z</dc:date>
    <item>
      <title>RT1176 FlexSPI Config Tool Generated Init Code: Another Bug</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI-Config-Tool-Generated-Init-Code-Another-Bug/m-p/1725040#M26865</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Again in SDK14.0, flexspi peripheral drivers 2.5.0.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The TX and RX watermark value in the config tool&amp;nbsp;represents the final value of the TXWMRK and RXWMRK field in the IPTXFCR and IPRXFCR register.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 322px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/241497iCFB3791153748D64/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For example, I should set the value to 7 in the config tool if I want a 64 Bytes (512 bits) watermark, and the following init code will be generated.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const flexspi_config_t FLEXSPI2_config = {
......
  .txWatermark = 7U,
  .rxWatermark = 7U,
......
};&lt;/LI-CODE&gt;&lt;P&gt;But the&amp;nbsp;FLEXSPI_Init function in the fsl_flexspi driver actually accepts the target byte value, then it calculates the final register value by itself.&amp;nbsp;That means I should&amp;nbsp;set the config-&amp;gt;tx/rxWatermark value to 64 instead of 7 if I want a 64 Bytes (512 bits) watermark.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;/* Configure IP Fifo watermarks. */
base-&amp;gt;IPRXFCR &amp;amp;= ~FLEXSPI_IPRXFCR_RXWMRK_MASK;
base-&amp;gt;IPRXFCR |= FLEXSPI_IPRXFCR_RXWMRK((uint32_t)config-&amp;gt;rxWatermark / 8U - 1U);
base-&amp;gt;IPTXFCR &amp;amp;= ~FLEXSPI_IPTXFCR_TXWMRK_MASK;
base-&amp;gt;IPTXFCR |= FLEXSPI_IPTXFCR_TXWMRK((uint32_t)config-&amp;gt;txWatermark / 8U - 1U);&lt;/LI-CODE&gt;&lt;P&gt;Even worse, if the&amp;nbsp;config-&amp;gt;tx/rxWatermark value is between 0 and 7, the result of the expression will be 0-1=-1, causing the final value of the&amp;nbsp;TXWMRK and RXWMRK field to be 5'b11111 (256 Bytes watermark), which is greater than the IP TX/RX FIFO size (128 Bytes). That prevents&amp;nbsp;the reading and writing process by the IP bus from working correctly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 00:55:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI-Config-Tool-Generated-Init-Code-Another-Bug/m-p/1725040#M26865</guid>
      <dc:creator>zylalx1</dc:creator>
      <dc:date>2023-09-19T00:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: RT1176 FlexSPI Config Tool Generated Init Code: Another Bug</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI-Config-Tool-Generated-Init-Code-Another-Bug/m-p/1736928#M27189</link>
      <description>&lt;P&gt;Well, this is not a &lt;SPAN&gt;technical&lt;/SPAN&gt; support request but a bug report. If someone from NXP see this, fix it please. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 01:17:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1176-FlexSPI-Config-Tool-Generated-Init-Code-Another-Bug/m-p/1736928#M27189</guid>
      <dc:creator>zylalx1</dc:creator>
      <dc:date>2023-10-11T01:17:20Z</dc:date>
    </item>
  </channel>
</rss>

