I’m using M4 processor bare-metal on TCM memory, but I’m running out of memory and I didn’t like to transfer it to OCRAM due to my product field limitations such as external interference.
I’m new on imx7 and I found some difficulty to understand and inspect the usage of Flash and RAM. Is it possivel to allocate my M4 to another memory space available on imx7, like Flash or RAM (512Mb)? I’m not sure witch would be the best practice in my case? Is there any good documentation or tutorial to help me manage my memory spaces?
If you TCM doesn’t fit your code the next suggested option is OCRAM. Could you please clarify about
“my product field limitations such as external interference”?
The next option after OSRAM is DDR. But it’s significantly slower. And you also need to configure Linux to not use DDR memory chunk reserved for M4. Please check this article.
Code location for M4 is defined by linker ld file.
Hi, Alex, thanks for your reply!
I’m developing a medical device, so the product has to fit into some safety rules. In the past we had issues with electromagnetic interference when using buses to run the processor. So I’m concerned about using OCRAM (Obs: we were not using Toradex yet).
Is that possible and appropriate to make M4 use both TCM, for more critical and fast process, and OCRAM (or DDR) ?
Both TCM and OCRAM are located inside of i.MX7 SOC. So moving program/data from TCM to OCRAM will not increase an EMI. But DDR is located outside of SOC and moving code there will increase EMI, though not significantly, since DDR is heavily used by A7 cores anyway.
Yes, you can locate your program/data in TCM and OCRAM simultaneously. From M4 point of view they are just a different addresses in a memory space. So you need to configure linker respectively.
Since this topic is not Toradex specific I recommend to use an NXP documentation and community along with Toradex support.
For example i.MX 7D with FreeRTOS - NXP Community
Right, Alex! I’m asking in NXP Community. Thanks for your help.