What is OCRAM?

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

What is OCRAM?

8,888 Views
jtro
Contributor III

Hi,

I'm using iMXRT1020-EVK board. I have seen RAM configuration in manual it says that the RAM is shared by ITCM, DTCM and OCRAM. After reading application note I got that different region can be used for different usage like ITCM (.text and critical code), DTCM (.data). but not found exact usage of OCRAM. In few doc it is used as user buffer but not sure..

If it is for user buffer then what is the difference between DTCM and OCRAM?

Default Linker is configured as

ITCM - 64KB,

DTCM - 64KB

OCRAM - 128 KB

I have compiled few of example code and observed that data is placed in ITCM and DTCM but OCRAM always remain Free.

Can i change allocation of OCRAM to 0 during run time?

Labels (1)
0 Kudos
Reply
5 Replies

8,249 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

   According to app note AN12077 (Using the i.MX RT FlexRAM) OCRAM is used during boot:

The minimum configuration of OCRAM is 64 KB.  This is required due to ROM code requires at least

64 KB of RAM for its execution (device dependent). 

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

  Customers can use OCRAM (after boot) as needed, in particular - for buffers.

 

  App note AN12437 (i.MX RT Series Performance Optimization) states, that "OCRAM shows higher

performance than TCM when accessed by DMA, while lower performance when accessed by MCU core.

The reason is that OCRAM and DMA are in this same bus fabric, with less latency during the access."

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

Have a great day,

Yuri.

 

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

 

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

8,249 Views
jtro
Contributor III

Are you saying OCRAM is used by primary bootloader reside in MCU (96KB)?

If yes then Is it possible to reduce OCRAM size after boot process?

0 Kudos
Reply

8,249 Views
Yuri
NXP Employee
NXP Employee

  Yes, OCRAM is used by the primary bootloader, located in the boot ROM of the MCU.

OCRAM size cannot be zero. Look at Table 2 (Static FlexRAM configuration defined by fuses in RT1020)

for allowed configurations in the app note.

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

~Yuri.

0 Kudos
Reply

8,250 Views
jtro
Contributor III

I'm asking about change RAM allocation in run time by using FLEXRAM_AllocateRam function after primary bootloader jumps to user application.

0 Kudos
Reply

8,250 Views
Yuri
NXP Employee
NXP Employee

  You can try it, but even in section 2.1.1.2 (Runtime configuration) of the app note AN12077

we can find the following note: " Consider at least 64 K B for the OCRAM configuration because

the ROM code requires this portion of RAM for execution (stack/static data)".

0 Kudos
Reply