iMXRT1020 Global Data Placement BOARD_SDRAM crashes

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

iMXRT1020 Global Data Placement BOARD_SDRAM crashes

496 Views
andrew58210
Contributor II

Hello,

I would like to place my global data in SDRAM and every time I do this I get a hard fault (IMPRECISERR (2) Imprecise data bus error).  I selected "BOARD_SDRAM" for Global data placement under C/C++ Build -> Settings -> MCU Linker ->Managed Linker Script.  Is there something else I need to do to make this work?

I'm using the sdcard_fatfs_freertos example out of the SDK.

Thanks

0 Kudos
1 Reply

489 Views
andrew58210
Contributor II

It seems to me the SDRAM is not getting initialized soon enough.  It is currently being initialized in BOARD_InitBootPeripherals(); but it seems that this being called in main() is too late.  Rather SDRAM must be initialized in startup_mimxrt1021.c in the ResetISR(void) routine before it attempts to copy data sections from flash to SRAM.  Is this possible to do?

0 Kudos