ECC ON S32K148 for Flash Memory

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

ECC ON S32K148 for Flash Memory

1,321 次查看
krishnasmartbytestech
Contributor I

We need to configure the ECC for the Program flash Memory,

Please share reference and application code for configure the ECC for the Flash memory 

I tried below steps

1) Set FERCNFG with 02 in the Main

2) Set the Bit FDFD to check whether interrupt generates or not.

I am not able see Status bit is getting changed and Interrupt is not generated

 

Thanks and regards

Krishna

 

0 项奖励
回复
5 回复数

1,312 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @krishnasmartbytestech,

Once FERCNFG[FDFD, DFDIE] are set, do you read the flash? This should assert the DFDIF flag.

The interrupt has to be enabled in NVIC though.

 

Regards,

Daniel

0 项奖励
回复

1,310 次查看
krishnasmartbytestech
Contributor I

we are running the program from flash, which means flash access should be done with the program execution right 

0 项奖励
回复

1,306 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, that is correct.

It might take a few instructions before the flag is set.

This is because of the core architecture.

If you want the flag to be asserted immediately, disable the write buffer:

S32_SCB->ACTLR |= S32_SCB_ACTLR_DISDEFWBUF_MASK;

 

Regards,

Daniel

 

0 项奖励
回复

1,292 次查看
krishnasmartbytestech
Contributor I

After I set the FDFD flag, i am polling for the bit DFDIF in FERSTAT and it never set.

 

Am i missing something ?

0 项奖励
回复

1,254 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @krishnasmartbytestech,

I don't have access to the S32K148 EVB right now, unfortunately.

But I tested in on other S32K1xx parts and it works as expected.

Can you test it with this simple code?

danielmartynek_0-1674471724295.png

 

Regards,

Daniel

0 项奖励
回复