RT1064 code placement in OCRAM2

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

RT1064 code placement in OCRAM2

Jump to solution
1,202 Views
choix361
Contributor I

Hi all,

I am currently using RT1064 and trying to place code in OCRAM2. 

I burned fuse for FlexRAM and configuration is 256KB-ITCM, 128KB-DTCM, 64KB-OCRAM(2028_0000~2028_FFFF). 

From manual, there is designated 512KB OCRAM2(2020_0000~2027_FFFF).

Q1: Is OCRAM2 safe to use as code space?

Q2: Does boot rom use OCRAM2 as general ram space?

Background: strange behavior on code execution which is placed at beginning of OCRAM2(2020_0000).

Program loads fine and during debug, it hits hard fault when code tries to jump to execute 2020_0000. I suspect this area has been modified by something. 

Labels (2)
Tags (1)
0 Kudos
1 Solution
1,153 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @choix361 ,

  Please check the application note:

https://www.nxp.com/docs/en/application-note/AN12077.pdf

kerryzhou_0-1635496704097.png

So, to keep safe, leave 64K for the ROM, thanks.

Best Regards,

Kerry

 

View solution in original post

0 Kudos
3 Replies
1,192 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @choix361 

Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

Q1: Is OCRAM2 safe to use as code space?

Answer: Yes, it's safe, just need to care during boot. As the ROM will use at least 64K during boot.

Q2: Does boot rom use OCRAM2 as general ram space?

Answer: Yes, you are right, ROM use 64K OCRAM2. please check this picture from the reference manual:

kerryzhou_0-1635301470093.png

kerryzhou_1-1635301485894.png

 

Wish it helps you!

Best Regards,

kerry

 

 

0 Kudos
1,180 Views
choix361
Contributor I

Hi Kerry,

Thanks for clarification. I have one follow up question. Attachment shows OCRAM2(0x2020_0000~0x2020_7FFF) is used by Boot ROM. 0x7FFF is 32K not 64K. However, your answer was "ROM use 64K OCRAM2"?

64K should be 0xFFFF.

Code can be safely placed from 0x2020_8000? (after 32K)

or 0x2021_0000? (after 64K)

 

-Hyunwoo

0 Kudos
1,154 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @choix361 ,

  Please check the application note:

https://www.nxp.com/docs/en/application-note/AN12077.pdf

kerryzhou_0-1635496704097.png

So, to keep safe, leave 64K for the ROM, thanks.

Best Regards,

Kerry

 

0 Kudos