iMX.RT685 PSRAM Examples Crashing

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

iMX.RT685 PSRAM Examples Crashing

1,223 Views
mzielinski
Contributor II

Hi,

I'm currently working with the RT685 eval board (MIMXRT685-EVK), and I'm having difficulty getting the SDK PSRAM examples running. The two examples are called evkmimxrt685_flexspi_psram_polling_transfer and evkmimxrt685_flexspi_psram_dma_transfer.

Both of these examples, when run directly after importing them from the SDK immediately crash after launching debug, with the message "Break at address "0xeffffffe" with no debug information available, or outside of program code." I was able to notice that the two examples don't declare any flash in the memory map. If I copy the flash settings used in other examples (location 0x8000000, size 0x800000, driver MIMXRT600_FlexSPI_B_MXIC_OPI.cfx), then debugging does start and the program stops on the first line of main() like you would expect. However, the program then crashes during the call to RESET_PeripheralReset(kFLEXSPI_RST_SHIFT_RSTn), inside the BOARD_InitPsRam(void) function. The exact line it crashes on is not consistent, the behavior chases depending on whether the code is stepped through line by line or if the program is just "Resumed" from the first line of main(). I'm not sure how to continue debugging this, so any advice would be appreciated.

I am using SDK version 2.9.0(435 2021-01-15) and mcuxpresso version 11.3.0 build 5222.

Thanks,

-Mike

Labels (1)
Tags (1)
0 Kudos
5 Replies

1,204 Views
mzielinski
Contributor II

This does seem to have been due to an outdated IDE/SDK version. I installed SDK v2.11.0 (541 2022-01-14) and IDE v11.5.0 (build 7232) this morning, and the PSRAM examples work like I would expect them to. The only remaining bit of strangeness is that to restart the debug session, I have to terminate it and relaunch it; if I just hit the "Restart" button, the debug session crashes again with the message "Break at address "0xeffffffe" with no debug information available, or outside of program code."

I would still really like to know why it wasn't working before, and how it was fixed. Maybe someone can look through some release notes for mentions about the PSRAM.

Thanks,

-Mike

0 Kudos

1,202 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
Hope you are well.
You can find the differences of the SDK version in the change log document that is located at the SDK folder: …\SDK_2_11_0_EVK-MIMXRT685.zip\docs
At that document, you can consult the fixes on that SDK version.

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos

1,196 Views
mzielinski
Contributor II

Thanks Omar,

I'm actually having the original issue I posted about when I try to implement PSRAM access in a large project by bringing over components from the example. Is it possible that the PSRAM example depends on the QSPI flash NOT being used to store the program? In other words, the PSRAM example runs completely from RAM?  I know my project uses the QSPI to store the program, but I'd like to try running from RAM. Can you point me to documentation that covers migrating from QSPI flash to RAM-only? Thanks.

0 Kudos

1,168 Views
mzielinski
Contributor II

According to the MCUXpresso IDE User Guide, to run an application from RAM one can check "Link application to RAM" in Project Properties > C/C++ Build > Settings > Tool Settings > MCU Linker > Managed Linker Script. Alternatively, one can edit the project memory map and remove all references to QSPI, but the first option is more elegant.

However, just this is not sufficient. In [project root]/MIMXRT685S/mcuxpresso/startup_mimxrt685s.c, the ResetISR function must be the defined with __attribute__ ((naked, section(".after_vectors.reset"))). The PSRAM example in SDK 2.9.0 was missing the "naked" keyword.

With this, I'll be able to develop and debug my application which uses the PSRAM, which will be good for a while, but I still will eventually need to know how to use PSRAM after booting from the QSPI. IS there any documentation or examples for this? Alternatively, is there documentation for copying the application from QSPI to RAM on boot and running from RAM? Thanks.

0 Kudos

1,131 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

I apologize for my delayed reply.
Please refer to this post on how to load the application to RAM:

https://community.nxp.com/t5/i-MX-RT/Loading-an-executable-image-into-RAM-in-MIMXRT1064/m-p/981096

https://community.nxp.com/t5/i-MX-RT/Can-t-run-code-from-RAM-on-i-MX-RT1064-evalboard/m-p/1325325

If you have more questions do not hesitate to ask me.
Best regards,
Omar

0 Kudos