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

452 Views
harikrishnan_ch
Contributor II

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
Reply
5 Replies

422 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
Reply

254 Views
harikrishnan_ch
Contributor II

Hello Deigo, 

Do you have any update on recreation of issue? 

thanks 

haric

0 Kudos
Reply

418 Views
harikrishnan_ch
Contributor II

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

159 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @harikrishnan_ch 

My apologies for the delayed response and thank you for providing additional information. 

By looking at your scatter file it seems that you are using LWIp stack, but what I do not know how is the large buffer related to the stack or how interacts with your application, so I could not reproduce your issue. Could you replicate this on a much simpler environment? 

Let me know if you found something else that we could consider during this time. 

Best regards, 

Diego

0 Kudos
Reply

420 Views
harikrishnan_ch
Contributor II

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
Reply