SRAM Memory Data store

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SRAM Memory Data store

1,266 Views
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.

Labels (1)
0 Kudos
2 Replies

840 Views
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 Kudos

840 Views
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 Kudos