Return from RAM Function Causes Hard Crash

Showing results for 
Search instead for 
Did you mean: 

Return from RAM Function Causes Hard Crash

Contributor IV


I am working with a RT1060EVK and the 2.10.0 SDK in MCUXpresso 11.3.1.

I am working with the QSPI chip on the FexlSPI bus and the device crashes when I return from the QSPI initialization function.  Stepping through the code, everything seems to work fin in the function (proper returns, proper sequence of setup, etc...), but I crash on the very next line of code after I return from the initialization function.  It doesn't seem to mater what that actual line of code is and putting a while(1) right before the return allows the program to sit idle until I stop the debugging; placing that same while(1) right after the return does crash.

The QSPI functions are all placed in SDRAM and I have confirmed that all of the fsl_flexspi functions and all of my functions pertaining to the QSPI are located there.  

The actual Hard Fault is caused by an undefined instruction and I can see that in the disassembly.  My expectation is that MCUXpresso handled all of the back and forth.  Does anyone have any suggestions on what to try?  I've been fighting with this issue for quite awhile and I'm behind in my project schedule.

0 Kudos
0 Replies