SRAM memory reserving

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SRAM memory reserving

跳至解决方案
2,970 次查看
vijayc1
Contributor II

Hai im using IMXRT1062 ,i need to reserve SRAM memory of 4kb how to do that and how to read and write on SRAM memory location?

0 项奖励
回复
1 解答
2,950 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @vijayc1 

   In the linker file, define a ram memory range for your own user ram area, then you define the variable in that range, after reset, no power off, the data still exists, you can read back the RAM data after reset.

 

Wish it helps you!

Best Regards,

Kerry

   

在原帖中查看解决方案

0 项奖励
回复
7 回复数
2,961 次查看
vijayc1
Contributor II

hai kerry i need it on RT1062 internal RAM.

0 项奖励
回复
2,957 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @vijayc1 ,

  If you need to use the internal ram, it is more easy, internal RAM contains: 128K ITCM,128k DTCM, 256k OCRAM. different RAM in the different location.

  About the operation, you just need to operate the related address is OK.

  Which IDE you are using? 

  If mcuxpresso, you can refer to this post to use the related address:

https://community.nxp.com/docs/DOC-335283

 

Wish it helps you!

Best Regards,

Kerry

0 项奖励
回复
2,954 次查看
vijayc1
Contributor II

I am using an application code where i need to write an value at a particular location of internal RAM to do a soft restart is that possible? because i need to read that value back again in the bootloader after the soft restart.

0 项奖励
回复
2,953 次查看
vijayc1
Contributor II

also can you suggest me if there are any particular registers that wont get erased after an reboot?

0 项奖励
回复
2,951 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @vijayc1 

   In the linker file, define a ram memory range for your own user ram area, then you define the variable in that range, after reset, no power off, the data still exists, you can read back the RAM data after reset.

 

Wish it helps you!

Best Regards,

Kerry

   

0 项奖励
回复
2,930 次查看
vijayc1
Contributor II

thank you for the reply,is there any code snippet to do the software reset?

0 项奖励
回复
2,964 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @vijayc1 

   The SRAM you mentioned is the external SRAM chip or the RT1062 internal RAM?

   If it is the external SRAM chip, you need to use the SEMC to connect to your external SRAM, you can refer to the SDRAM code, it will remap to the 0x80000000 address, you need to initialize the SEMC with your external memory, then you can access the related address directly.

  SDK code:

SDK_2_10_0_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\semc\sdram

Wish it helps you!

Best Regards,

Kerry

0 项奖励
回复