SRAM memory reserving

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

SRAM memory reserving

Jump to solution
2,974 Views
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 Kudos
Reply
1 Solution
2,954 Views
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

   

View solution in original post

0 Kudos
Reply
7 Replies
2,965 Views
vijayc1
Contributor II

hai kerry i need it on RT1062 internal RAM.

0 Kudos
Reply
2,961 Views
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 Kudos
Reply
2,958 Views
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 Kudos
Reply
2,957 Views
vijayc1
Contributor II

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

0 Kudos
Reply
2,955 Views
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 Kudos
Reply
2,934 Views
vijayc1
Contributor II

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

0 Kudos
Reply
2,968 Views
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 Kudos
Reply