5880 views|0 replies

118

Posts

1

Resources
The OP
 

【EasyARM-RT1052 Review】+ SDRAM Memory Management [Copy link]

Because I am using the SDRAM_Debug project, the evkbimxrt1050_sdram_init.ini initialization file in the project directory is called when the system starts up, so your subsequent applications can directly read and write SDRAM in the form of addresses. The flexspi_nor project is similar. Modify the MIMXRT1052xxxxx_sdram.scf file in the project directory and reduce 1M of SDRAM memory. You can see that the 32MB of SDRAM memory is discontinuous. The middle section 0x81D00000~0x81E00000 is used for my own memory management, and the memory management configuration table is also placed in this position. So the maximum memory pool is actually not 1MB, and the configuration table array size needs to be subtracted. The memory block size allocated by memory management is 64Byte, so each application is 64 bytes Initialize the memory pool and clear the data The implementation of the memory allocation function is to search the configuration from the beginning and find a continuous memory block The implementation of the memory release function Test memory management, initialize the memory pool, apply for 512 bytes, occupy 8 memory blocks, and the corresponding data is written Apply for another 256 bytes, occupying 4 memory blocks, and the corresponding data is written immediately after the previous address Release the memory applied for the first time. You can see that the data in the configuration table has been cleared and can be used for the next application, but the data in the memory has not been processed, so it has not changed (it should be cleared to be more appropriate) The third time applying for 128 bytes of memory, you can see that the configuration table is updated and the corresponding data is written to the memory address, indicating that the memory management functions are correct. Attach the project file hello_eeworld.rar (135.34 KB, downloads: 32) ,Put it in the SDK_2.4.2_MIMXRT1052xxxxB\boards\EasyARM-RT1052-V1_0\demo_apps directory and unzip it. The keil version is V5.26.2.0 This content is created by EEWORLD forum user ID.LODA. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source


This post is from NXP MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list