Unable to synchronize DLL delay loop during FLEXSPI_SetFlashConfig execution

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to synchronize DLL delay loop during FLEXSPI_SetFlashConfig execution

Jump to solution
445 Views
mimlo
Contributor III

Hi,

I have a problem with DLL configuration for external flash memory using hyperbus.

Hardware description:
Custom board with imxrt1170 microcontroller. FLEXSPI1 is connected to the INFINEON's S26HS512TGABHI000 hyperflash. It uses differential clock and is set up to work in combined mode in order to use 8 data lines.

The issue:
Whenever I set the flexspiRootClk to something over 100MHz, the code hangs in the loop below.mimlo_0-1690972082627.png
However, If I comment this loop out, the code works correctly for the given moment. I only did so for experimentational purposes and I had not intent in modifying fsl_flexspi API.

Synchronization (i.e. breaking out of the loop) happens only for clock setups slower than 100MHz (for which there is a dedicated if statement check which in turn is responsible for setting up the DLL config value inside FLEXSPI_CalculateDll function).
What could be a possible reason/solution for this issue?

I have been struggling with this problem for a while now, so I decided to post it as a question on the forum. Please let me know if you need any further details regarding my setup or anything else.

BR,
Michael

Labels (1)
0 Kudos
1 Solution
388 Views
mimlo
Contributor III

Since I got no reply for my topic, I will report to you what has worked for my specific case. I managed to get the DLL to synchronize.

I was totally unaware of the fact that when one uses XIP_EXTERNAL_FLASH=1, then there is this thing sort of "hidden" in the clock_config.c

mimlo_0-1692857513739.png
It was actually not running my FLEXSPI1 at 200MHz, because of the fact that I had this define set to 1 which in turn does not set the divider for the FLEXSPI1 root clock.

I hope that my findings will come in handy and serve you well.
Thanks

View solution in original post

0 Kudos
1 Reply
389 Views
mimlo
Contributor III

Since I got no reply for my topic, I will report to you what has worked for my specific case. I managed to get the DLL to synchronize.

I was totally unaware of the fact that when one uses XIP_EXTERNAL_FLASH=1, then there is this thing sort of "hidden" in the clock_config.c

mimlo_0-1692857513739.png
It was actually not running my FLEXSPI1 at 200MHz, because of the fact that I had this define set to 1 which in turn does not set the divider for the FLEXSPI1 root clock.

I hope that my findings will come in handy and serve you well.
Thanks

0 Kudos