<?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 MCXN947 DLL auto-adjusted function not working in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-DLL-auto-adjusted-function-not-working/m-p/2415955#M5951</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the MCXN947 via FlexSPI with an OctalRAM (IS66WVO32M8DALL-200BLI).&lt;BR /&gt;The FlexSPI root clock is supplied at 150 MHz via PLL1, and since the RAM operates in DDR mode, I have an output clock rate of 75 MHz.&lt;BR /&gt;The `flexspi_device_config_t` has the following parameters:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;flexspi_device_config_t psram_config =
{
    .flexspiRootClk = 150000000U,
    .isSck2Enabled = false,
    .flashSize = OCTALRAM_ISSI_SIZE,
    .CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle,
    .CSInterval = 2,
    .CSHoldTime = 2,
    .CSSetupTime = 2,
    .dataValidTime = 2,
	.columnspace = 4,
    .enableWordAddress = false,
    .AWRSeqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA,
    .AWRSeqNumber = 1,
    .ARDSeqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_READDATA,
    .ARDSeqNumber = 1,
    .AHBWriteWaitUnit = kFLEXSPI_AhbWriteWaitUnit2AhbCycle,
    .AHBWriteWaitInterval = 0,
    .enableWriteMask = true,
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To initialize FlexSpi, I use the SDK FLEXSPI_DRIVER, version 2.6.0.&lt;BR /&gt;When I configure the delay cells using the auto-adjusted function (as described in the manual under section 10.3.15.6, “DLL configuration for sampling”) with the following values:&lt;BR /&gt;• SLVDLYTARGET=0x0F (divider 16/32 * root_clock = 3.33 ns)&lt;BR /&gt;• REFPHASEGAP=0x02&lt;BR /&gt;• DLLEN=0x01&lt;BR /&gt;• OVRDEN=0x01&lt;/P&gt;&lt;P&gt;After waiting for the ASLVLOCK and AREFLOCK lock bits, I get 0x01 for ASLVSEL and 0x00 for AREFSEL. Consequently, the RAM's read and write functions do not work, since the set delay time is approximately 120 ps!&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    /* Configure DLL. */
    configValue        = FLEXSPI_CalculateDll(base, config);
    base-&amp;gt;DLLCR[index] = configValue;

    /* DLL neu kalibrieren */
    base-&amp;gt;DLLCR[0] |= FLEXSPI_DLLCR_DLLRESET_MASK;
    base-&amp;gt;DLLCR[0] &amp;amp;= ~FLEXSPI_DLLCR_DLLRESET_MASK;

    /* Exit stop mode. */
    base-&amp;gt;MCR0 &amp;amp;= ~FLEXSPI_MCR0_MDIS_MASK;

    /* Lock abwarten */
    while ((base-&amp;gt;STS2 &amp;amp;
           (FLEXSPI_STS2_AREFLOCK_MASK |
            FLEXSPI_STS2_ASLVLOCK_MASK)) !=
           (FLEXSPI_STS2_AREFLOCK_MASK |
            FLEXSPI_STS2_ASLVLOCK_MASK))
    {
    }

    SDK_DelayAtLeastUs(10U, CLOCK_GetCoreSysClkFreq());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="MCXN947_DLL_register.jpg" style="width: 772px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/396803i7BC2432D22991D2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="MCXN947_DLL_register.jpg" alt="MCXN947_DLL_register.jpg" /&gt;&lt;/span&gt;&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;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I use different values for SLVDLYTARGET, the output of ASLVLOCK and AREFLOCK does not change.&lt;BR /&gt;However, if I set the delay time to a fixed value using the registers OVRDEN=0x01 and OVRDVAL=0x1b (corresponding to a delay time of approximately 3.36 ns), reading from and writing to RAM works without any problems.&lt;/P&gt;&lt;P&gt;However, since the root clock is greater than 100 MHz, NXP recommends using the DLL's auto-adjustment feature.&lt;/P&gt;&lt;P&gt;Unfortunately, it doesn't seem to be able to determine the correct delay time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2026 09:30:15 GMT</pubDate>
    <dc:creator>IbhDaniel</dc:creator>
    <dc:date>2026-09-24T09:30:15Z</dc:date>
    <item>
      <title>MCXN947 DLL auto-adjusted function not working</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-DLL-auto-adjusted-function-not-working/m-p/2415955#M5951</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using the MCXN947 via FlexSPI with an OctalRAM (IS66WVO32M8DALL-200BLI).&lt;BR /&gt;The FlexSPI root clock is supplied at 150 MHz via PLL1, and since the RAM operates in DDR mode, I have an output clock rate of 75 MHz.&lt;BR /&gt;The `flexspi_device_config_t` has the following parameters:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;flexspi_device_config_t psram_config =
{
    .flexspiRootClk = 150000000U,
    .isSck2Enabled = false,
    .flashSize = OCTALRAM_ISSI_SIZE,
    .CSIntervalUnit = kFLEXSPI_CsIntervalUnit1SckCycle,
    .CSInterval = 2,
    .CSHoldTime = 2,
    .CSSetupTime = 2,
    .dataValidTime = 2,
	.columnspace = 4,
    .enableWordAddress = false,
    .AWRSeqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_WRITEDATA,
    .AWRSeqNumber = 1,
    .ARDSeqIndex = HYPERRAM_CMD_LUT_SEQ_IDX_READDATA,
    .ARDSeqNumber = 1,
    .AHBWriteWaitUnit = kFLEXSPI_AhbWriteWaitUnit2AhbCycle,
    .AHBWriteWaitInterval = 0,
    .enableWriteMask = true,
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To initialize FlexSpi, I use the SDK FLEXSPI_DRIVER, version 2.6.0.&lt;BR /&gt;When I configure the delay cells using the auto-adjusted function (as described in the manual under section 10.3.15.6, “DLL configuration for sampling”) with the following values:&lt;BR /&gt;• SLVDLYTARGET=0x0F (divider 16/32 * root_clock = 3.33 ns)&lt;BR /&gt;• REFPHASEGAP=0x02&lt;BR /&gt;• DLLEN=0x01&lt;BR /&gt;• OVRDEN=0x01&lt;/P&gt;&lt;P&gt;After waiting for the ASLVLOCK and AREFLOCK lock bits, I get 0x01 for ASLVSEL and 0x00 for AREFSEL. Consequently, the RAM's read and write functions do not work, since the set delay time is approximately 120 ps!&lt;/P&gt;&lt;LI-CODE lang="c"&gt;    /* Configure DLL. */
    configValue        = FLEXSPI_CalculateDll(base, config);
    base-&amp;gt;DLLCR[index] = configValue;

    /* DLL neu kalibrieren */
    base-&amp;gt;DLLCR[0] |= FLEXSPI_DLLCR_DLLRESET_MASK;
    base-&amp;gt;DLLCR[0] &amp;amp;= ~FLEXSPI_DLLCR_DLLRESET_MASK;

    /* Exit stop mode. */
    base-&amp;gt;MCR0 &amp;amp;= ~FLEXSPI_MCR0_MDIS_MASK;

    /* Lock abwarten */
    while ((base-&amp;gt;STS2 &amp;amp;
           (FLEXSPI_STS2_AREFLOCK_MASK |
            FLEXSPI_STS2_ASLVLOCK_MASK)) !=
           (FLEXSPI_STS2_AREFLOCK_MASK |
            FLEXSPI_STS2_ASLVLOCK_MASK))
    {
    }

    SDK_DelayAtLeastUs(10U, CLOCK_GetCoreSysClkFreq());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="MCXN947_DLL_register.jpg" style="width: 772px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/396803i7BC2432D22991D2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="MCXN947_DLL_register.jpg" alt="MCXN947_DLL_register.jpg" /&gt;&lt;/span&gt;&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;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even if I use different values for SLVDLYTARGET, the output of ASLVLOCK and AREFLOCK does not change.&lt;BR /&gt;However, if I set the delay time to a fixed value using the registers OVRDEN=0x01 and OVRDVAL=0x1b (corresponding to a delay time of approximately 3.36 ns), reading from and writing to RAM works without any problems.&lt;/P&gt;&lt;P&gt;However, since the root clock is greater than 100 MHz, NXP recommends using the DLL's auto-adjustment feature.&lt;/P&gt;&lt;P&gt;Unfortunately, it doesn't seem to be able to determine the correct delay time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2026 09:30:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-DLL-auto-adjusted-function-not-working/m-p/2415955#M5951</guid>
      <dc:creator>IbhDaniel</dc:creator>
      <dc:date>2026-09-24T09:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: MCXN947 DLL auto-adjusted function not working</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-DLL-auto-adjusted-function-not-working/m-p/2416418#M5955</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/266810"&gt;@IbhDaniel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the post!&lt;/P&gt;
&lt;P&gt;The MCXNx4 Reference Manual indicates that the serial root clock is the FlexSPI core clock (see Table 79. Clock Usage). In your case, this clock is configured to 150 MHz.&lt;/P&gt;
&lt;P&gt;I also see that you have implemented the DLL sampling configuration, and the auto-calibration path appears to be the correct approach. The settings SLVDLYTARGET = 0x0F and DLLEN = 0x01 were configured correctly. The only issue identified was OVRDEN = 0x01 instead of 0x00, which disables the auto-calibration output path and causes ASLVSEL = 0x01 and AREFSEL = 0x00 regardless of the SLVDLYTARGET value.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="carlos_o_0-1790368326908.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/396899i2EE46910ED6899DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="carlos_o_0-1790368326908.png" alt="carlos_o_0-1790368326908.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would just like to confirm that the above analysis applies to your implementation. Could you please verify that: MCR0[RXCLKSRC] = 3h (Flash-memory-provided read strobe and input from DQS pad) is being used in your configuration?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2026 20:32:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/MCXN947-DLL-auto-adjusted-function-not-working/m-p/2416418#M5955</guid>
      <dc:creator>carlos_o</dc:creator>
      <dc:date>2026-09-25T20:32:46Z</dc:date>
    </item>
  </channel>
</rss>

