SRAM Memory Data store

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

SRAM Memory Data store

2,088 次查看
jaewoosong
Contributor III

I calculate angle data by using tanzent lookup table. Tanzent lookup table is const type data.

S32K144 SRAM size is that SRAM_L(32KB), SRAM_U(24KB).

But because SRAM_L memory is fiiled with generated code(HAL & FlexDriver), so SRAM_L

memory not enough for user data as lookup table..

My question is as following:

1) Why const type data stored in SRAM_L, not flash memory ? Is that correct ?

2) How can I store const type data in flash memory(Pflash or Dflash ?), not SRAM_L ?

Thank you.

标签 (1)
0 项奖励
回复
2 回复数

1,662 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

how did you defined the constant? If it is defined as 'volatile' like:

volatile const unsigned int myconst = 0x123;

... then it will be placed to RAM.

If it is defined without 'volatile' like

const unsigned int myconst = 0x123;

... then the constant is either optimized out and compiler uses immediate value in asm code or the constant is placed to .rodata section in flash.

Regards,

Lukas

0 项奖励
回复

1,662 次查看
jaewoosong
Contributor III

Thank you for reply.

I find my mistake for S32 Design studion setting.

Debug option is set to Debug_RAM.

So all variable is stored to SRAM.

After changing Debug, const type is stored in Flash.

Thank you.

0 项奖励
回复