how to put a variable on S32k eeprom

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

how to put a variable on S32k eeprom

3,140件の閲覧回数
momo12
Contributor III

Hi

how can I put a variable on s32k eeprom?

__eeprom unint32_t MyVariable. doesnt work.

タグ(1)
0 件の賞賛
返信
3 返答(返信)

2,648件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
The EEPROM is accessible in FlexRAM so you can use a pointer on a location in FlexRAM.

Regards,
Daniel

0 件の賞賛
返信

2,648件の閲覧回数
momo12
Contributor III

What is the compiler directive to put a variable/Array on Flexram then?

0 件の賞賛
返信

2,648件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

you can use PE Micro partition feature and add your data into FlexRAM section (already partitioned by PE Micro as emulated eeprom) by __attribute__ specifier. You can find partition option in debug configurations -> Advanced Options

pastedImage_1.png

pastedImage_2.png

You can find more details about EEESIZE and DEPART in reference manual. 

Modify your linker file and add flexram section - like this: 

pastedImage_3.png

And add your variable in .eeeprom section - for example in your main.c:

pastedImage_4.png

Here is an example related to this topic - Example: S32K144 EEEPROM usage 

Hope it helps. 

Jiri 

0 件の賞賛
返信