Regarding the RAM location for the s32k312

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

Regarding the RAM location for the s32k312

跳至解决方案
801 次查看
vinaychitturi
Contributor III

Hello,

Currently In our project we are using s32k312 micro, According to that micro data sheet regarding the RAM location it is showing 192kb. But in that SRAM is having 96kb and DTCM is having 64 kb.

So i would like to know who is the using the remaining size of the ram location?

What kind of data does the DTCM and ITCM memory locations stored? Is there any particular RTD's or Peripherals which are using those memory sections.

Currently for our project we are running out of SRAM location, Can we use the Memory of the DTCM for that SRAM?

0 项奖励
回复
1 解答
726 次查看
vinaychitturi
Contributor III

Thanks daniel for the response.

在原帖中查看解决方案

0 项奖励
回复
4 回复数
748 次查看
vinaychitturi
Contributor III

Hello Daniel,

Sorry for the late response. I am out of office for few days. 

Thanks for sharing the code. I looked into that code and I understood how we can use the DTCM and ITCM memory locations.

In our project i want to use some portion of that DTCM memory for the sram memory. 

SO I created a new section for the dtcm_sram in linker file and assigned the section as shown below.

.dtcm_sram_data : AT(__sram_data_rom_end)
{
. = ALIGN(4);
__dtcm_sram_data_begin__ = .;
. = ALIGN(4);
*(.ramcode)
. = ALIGN(4);
*(.data)
*(.data*)
. = ALIGN(4);
*(.mcal_data)
. = ALIGN(4);
__dtcm_sram_data_end__ = .;
} > int_dtcm_sram
__dtcm_sram_data_rom_end = __sram_data_rom_end + (__dtcm_sram_data_end__ - __dtcm_sram_data_begin__);

I am sharing the modified linker file and the project. 

Can you please let me know whether the changes are proper or not? and let me know whether can I use the DTCM memory in the way I am using it right now.

 

0 项奖励
回复
735 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @vinaychitturi,

I'm out of office, I cannot test it, but I don't see any issues in that.

 

Regards,

Daniel

0 项奖励
回复
727 次查看
vinaychitturi
Contributor III

Thanks daniel for the response.

0 项奖励
回复
779 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @vinaychitturi,

There is 96KB of SRAM, 32KB of ITCM and 64KB of DTCM.

Have a look at the default linker file of RTD projects.

danielmartynek_0-1716982560910.png

DTCM is used for the stack.

 

Refer to this example:

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-Siul2-Port-Ip-Example-S32K344-ITCM-DTCM-S32...

 

Regards,

Daniel

 

 

0 项奖励
回复