ECC ON S32K148 for Flash Memory

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

ECC ON S32K148 for Flash Memory

1,318 Views
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 Kudos
Reply
5 Replies

1,309 Views
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 Kudos
Reply

1,307 Views
krishnasmartbytestech
Contributor I

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

0 Kudos
Reply

1,303 Views
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 Kudos
Reply

1,289 Views
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 Kudos
Reply

1,251 Views
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 Kudos
Reply