S32K118 noinit RAM

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

S32K118 noinit RAM

1,964 次查看
YuepengWang
Contributor I

Hello NXP,

I have a question when I am trying to implement bootloader of S32K118, please give me some help.

First of all, I have defined the ".noinit" section in the linker file ,from 0x200057C0 to 0x200057FF.

Then, I have defined two pointer variables(uint32_t) like this:

uint32_t * pProgrammingReqFlag = (uint32_t *)0x200057c0;
uint32_t * pApplicationValidity = (uint32_t *)0x200057c4;

And the values in these addresses will be checked after reset(you will find in "main.png").

The question is: when I downloaded this project into hardware ,it works well, but if I reset the hardware (power off and power on), it do not work any more !

How to access the .noinit section ? or is there anything else need to be modified in the linker file?

0 项奖励
回复
4 回复数

1,931 次查看
YuepengWang
Contributor I

It is resolved by modifying the initializer of ecc-ram.

0 项奖励
回复

1,917 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, ECC is the key point.

And let me share recommended procedure to retain SRAM content across reset:

SRAM retention.jpg

Regards,

Lukas

 

0 项奖励
回复

1,905 次查看
YuepengWang
Contributor I
Hi Lukas, thank you for your information !
0 项奖励
回复

1,962 次查看
YuepengWang
Contributor I

BTW, if these two variables point to any other address which is not located into the .noinit section, it works well after power on.

uint32_t * pProgrammingReqFlag = (uint32_t *)0x200027c0;
uint32_t * pApplicationValidity = (uint32_t *)0x200027c4;

0 项奖励
回复