AnsweredAssumed Answered

SDRAM configuration on MIMXRT1050-EVK(B) using FreeRTOS

Question asked by Henrique Klein on Mar 7, 2019
Latest reply on Mar 21, 2019 by Kerry Zhou



Recently I started to work with the MCUXpresso SDK 2.5 on the MIMXRT1050-EVK(B). As a basis for my system I used a FreeRTOS virtual comm example and from there started to customize according to my future application.


As a proof of concept I made some changes to the default configuration of the examples provided by the SDK, such as using QSPI with XIP instead of HyperFlash. In between some changes I anticipated that my application might use a lot of FreeRTOS heap memory (which is considered a global variable, right?), so I changed the configuration of "Global data placement" to the BOARD_SDRAM. After compiling the map succesfully showed that my actual heap and stack were still in my internal memory (SRAM_DTC) while my FreeRTOS heap was in the SDRAM.


Memory region Used Size Region Size %age Used
BOARD_FLASH: 81348 B 8 MB 0.97%
SRAM_DTC: 16 KB 128 KB 12.50%
SRAM_ITC: 0 GB 128 KB 0.00%
SRAM_OC: 0 GB 256 KB 0.00%
BOARD_SDRAM: 72048 B 32 MB 0.21%


When first trying to debug the application resulted in a Hardfault which made me search in the community for answers and found similar problems on the links bellow:


Issue with MIMXRT1050-EVK, FreeRTOS and SDRAM for data storage 

hard fault when FreeRTOS heap is in external SDRAM 


I tried just about everything mentioned in Ed Waldner's thread and had even inferior results than him, not being able to run the code a single time. As for now, I tried to initialize the SDRAM as it is initialized in the evkbimxrt1050_semc example (both in main function as in the ResetISR()) and nothing seems to work.


As of now, my latest version is configured as such:




Does anybody know what am I missing? I followed the tutorial on Overview of using the MIMXRT1050-EVK(B) with MCUXpresso IDE  but that failed too.



Thanks in advance.