iMX RT1021 TCM and OCRAM allocation and issue

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

iMX RT1021 TCM and OCRAM allocation and issue

154 Views
harikrishnan_ch
Contributor I

Scenario:

  • We have design, where firmware utilizes only IRAM.
  • Our usage was within 128Kb utilizing 2 TCM banks (64K each).
  • We have expanded the design and RAM usage increased above 128Kb.
  • We had enabled OCRAM (128Kb)  in scatter loader file.
  • .map file looks normal and memory is allotted.
  • We are using standard MPU configuration given in example. ( is cached has play here? )

Issue:

Application starts misbehaving when large memory buffer is allocated with new scatter loader file.

Some of the functionalities partially fail, like File system, network etc.

 

I have attached  map file generated with and without large buffer allocated in the program.

Like to have suggestion on, what I am missing here and root cause for the issue.

Thanks.

Labels (1)
0 Kudos
3 Replies

124 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @harikrishnan_ch 

I understood, that you where first using the ITCM and DTMC ( 64 KB each) for your application. But then you also required the OCRAM ( 128 KB), so you started to use this memory.

I have the i.MX RT1020 to work and SDK examples. Are you able to point me how I could replicate your issue with using an  SDK example as an starting point? 

Are you using KEIL or IAR? What is your current SDK version?

Cache could sometimes have an implication on system, application performance. 

Best regards, 

Diego

 

0 Kudos

120 Views
harikrishnan_ch
Contributor I

Hello Deigo, 

But , after reading a bit of data sheet  and memory related application note. 

I disabled only Data Cache in code. 

/* Enable I cache and D cache */
//SCB_EnableDCache();
SCB_EnableICache();

Now the system functions properly. I do not see and un usual behaviour of program.

Still, I like to knwo the root cause and why controller memory access behaves in such manner.

thanks and regards

haric

0 Kudos

122 Views
harikrishnan_ch
Contributor I

Hello Diego,

I use Keil and SDK version in reference with Keil is MIMXRT1021_DFP 12.1.0. 

SDK is older version 

I had attached .map file, there you could find typical use case where memory usage can be seen. 

based on that you could create a test scenario.

harikrishnan_ch_0-1714725485435.png

harikrishnan_ch_1-1714726069479.png

 

thanks and regards

haric

0 Kudos