S32K312 Understanding SRAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K312 Understanding SRAM

502 次查看
Hareesh_S
Contributor II

Hello,

I am using an S32K312 MCU and have run out of SRAM (>32KB).

Hareesh_S_0-1754913458015.png

 

From my understanding, the K312 has 96KB of SRAM, where 32KB is standby RAM, 32KB is no_cacheable and the last 32KB is shareable.

I do not fully understand the practical limitation to these sections, specifically with respect to the shareable section, given that the K312 is a single core and non-lockstep MCU. (I assume no_cacheable implies that data here cannot be moved to cache?)

Is there a section of the reference manual I should refer to for more information on this? All I have found is AN13388 but it only seems to describe the standby section in detail.

Additionally, what are int_sram_fls_rsv, int_sram_results and int_stack_dtcm sections for?

Tying back to my initial problem, if I am using more than 32KB ram (statically) do I need to manually place certain variables in the other ram sections? And how does this behaviour change WRT stack/heap? Can my stack/heap grow more than 32KB?

Much thanks in advance!

0 项奖励
回复
6 回复数

466 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport


int_pflash: Main program flash memory for storing application code.
int_dflash: Non-volatile memory for storing persistent data like configuration or logs.
int_itcm: Fast memory for critical code execution with zero wait states.
int_dtcm: Fast memory for frequently accessed data with deterministic timing.
int_stack_dtcm: Dedicated fast memory for the stack to ensure reliable execution.
int_sram: General-purpose SRAM for variables, buffers, and heap.
int_sram_fls_rsv: Reserved SRAM for flash-related operations.
int_sram_no_cacheable: SRAM region excluded from caching, ideal for DMA or peripherals.
int_sram_results: Small reserved area for storing diagnostic or test results.
int_sram_shareable: Memory region intended for shared data, even in single-core use.
ram_rsvd2: Marker indicating the end of the SRAM address space.

You can may change memory segment's addresses and sizes but it is needed to keep in mind boundaries given by memory resources.

0 项奖励
回复

446 次查看
Hareesh_S
Contributor II
Hello,
Thank you for response.
So to clarify, am I right in saying there is no practical limitation on any of the SRAM segments and that I could theoretically group the whole 96KB into a single SRAM segment?
0 项奖励
回复

443 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I would recommend not to change used segments anyhow. You can use size of 0 in case it is not used anyhow.

0 项奖励
回复

438 次查看
Hareesh_S
Contributor II
I do not intend on changing them, my question is merely to understand if there is a hard, physical limitation/difference between the different SRAM sections. Additionally, regarding the int_sram_shareable section, can you explain what "shared data" means in this case? Shared between what?

Much thanks for the clarification thus far!
0 项奖励
回复

424 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

It is rather generic for all S32K3 derivatives, so it is for sharing data between cores.

Possibly it can be used it data are shared between core and other XBAR master as DMA or other. It could be certain AUTOSAR requirement - I am not completely sure.

0 项奖励
回复

315 次查看
Hareesh_S
Contributor II
Ohhokay understood.
Much thanks for the clarification
0 项奖励
回复