Hi Team,
We are currently working on S32K322 and have a query regarding the usage of the DTCM memory blocks.
According to the reference manual/datasheet, the device provides two DTCM blocks (DTCM_0 and DTCM_1). However, in the provided linker file we see that only DTCM_0 is being used by default.
We would like to understand:
How can we make use of the DTCM_1 block in our application?
Are there any specific configuration steps required in the linker script or startup code to enable and map DTCM_1?
Are there any restrictions or recommendations for assigning code/data between DTCM_0 and DTCM_1?
Could you please provide guidance or an example on how to properly configure and use both DTCM blocks?
Your support will help us to effectively utilize the available memory resources. I have attached the snippets of the DTCM_1 Memory Block.
BR,
Lisha Sweetha
Hi @Lisha,
The S32K322 MCU features two application cores, designated as CM7_0 and CM7_1.
Each core has direct access to its own Tightly Coupled Memory (TCM):
Both DTCM0 and DTCM1 are mapped to the same address space: 0x20000000.
CM7_0 can only access TCM_1 via a backdoor mechanism—it does not have direct access.
When you create a new S32K322 RTD project in the S32 Design Studio (S32DS) IDE, the IDE generates two separate projects, one for each core. Each project includes its own linker file, which defines memory sections such as int_dtcm, corresponding to the internal DTCM region for that core.
Regards,
Daniel
Hi @danielmartynek ,
Thank you for your quick reply.
I am currently facing a HardFault issue. Specifically, when I configure the ITCM memory to its full size (64KB), the application escalates into a HardFault.
Could you please advise if there are any additional steps or limitations when using the complete ITCM block?
Any guidance on how to correctly enable and utilize the full 64KB ITCM without encountering a HardFault would be very helpful.
BR,
Lisha
Hi Lisha,
There is just 32KB of ITCM_0.