Hi
Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
Firstly, it's correct to set up the heap area into external RAM as the below Figure shows.

Then, the root cause of the phenomenon is SDRAM initialization should be prior to jumping to main(), so I'd recommend you to use the Device Configuration Data (DCD) feature allows the boot ROM code to obtain the SOC configuration data from an external program image residing on the boot device, as an example, the DCD can be used to program the SDRAM controller for optimal settings, improving the boot performance.
To implement it, I'd like to other demos as the template instead of the semc demo, as it should avoid duplicate initialize the SDRAM, it may cause unpredictable issue.
In my experience, hello_world demo is a good choice, in this demo, it has enabled the Device Configuration Data (DCD) feature.

Hope it helps.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------