SRAM Memory Data store

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SRAM Memory Data store

2,089件の閲覧回数
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,663件の閲覧回数
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,663件の閲覧回数
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 件の賞賛
返信