KE1 ECC RAM Single Bit Corrrection

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

KE1 ECC RAM Single Bit Corrrection

Jump to solution
123 Views
sean_dvorscak
Contributor III

Have a few questions regarding ECC.

I am currently using the MCM_LMFAR to determine where the ECC triggered a fault and then using that address to read then write back to correct it.

Questions:

1. Does the ECC have the ability to autocorrect bits? Or do I really need to perform this read/write to address to correct?

2. If there is not autocorrect, will I need to compensate for byte alignment when performing my read/write correction mechanism? Currently I am performing a 4-byte read/write at the address denoted by the MCM_LMFAR. I feel like this is dangerous as I am not sure the MCM_LMFAR will always show a 4-byte aligned address.

0 Kudos
Reply
1 Solution
30 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @sean_dvorscak ,

Thanks for your reply.

So for your questions:

1. Does the ECC have the ability to autocorrect bits? Or do I really need to perform this read/write to address to correct?

->> Yes, ECC does support hardware correction for single-bit errors. So you should not need a software read/write sequence to obtain corrected data. 

2. If there is not autocorrect, will I need to compensate for byte alignment when performing my read/write correction mechanism? Currently I am performing a 4-byte read/write at the address denoted by the MCM_LMFAR. I feel like this is dangerous as I am not sure the MCM_LMFAR will always show a 4-byte aligned address.

->> If implementing an optional scrub, please align the access according to the actual access size or scrub granularity, not blindly to the raw MCM_LMFAR value. Also don't use a fixed 4-byte access unless you first align the address appropriately and confirm the access size is valid.

In fact, For multi-bit / non-correctable ECC events , do not assume a read/write can repair the data, you should treat it as data corruption and recover from a known-good source or reinitialize the affected memory as appropriate.

Hope it helps.

BR

Celeste

 

---------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
---------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
5 Replies
89 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @sean_dvorscak ,

Thank you for your post.
Could you please let me know which specific device in the KE1 family you are using?
This will help me locate the relevant documentation more accurately or perform validation using the same device.

BR

Celeste

0 Kudos
Reply
81 Views
sean_dvorscak
Contributor III

It's a KE18F512VLH16.

Thanks for your help.

0 Kudos
Reply
31 Views
Celeste_Liu
NXP Employee
NXP Employee

Hello @sean_dvorscak ,

Thanks for your reply.

So for your questions:

1. Does the ECC have the ability to autocorrect bits? Or do I really need to perform this read/write to address to correct?

->> Yes, ECC does support hardware correction for single-bit errors. So you should not need a software read/write sequence to obtain corrected data. 

2. If there is not autocorrect, will I need to compensate for byte alignment when performing my read/write correction mechanism? Currently I am performing a 4-byte read/write at the address denoted by the MCM_LMFAR. I feel like this is dangerous as I am not sure the MCM_LMFAR will always show a 4-byte aligned address.

->> If implementing an optional scrub, please align the access according to the actual access size or scrub granularity, not blindly to the raw MCM_LMFAR value. Also don't use a fixed 4-byte access unless you first align the address appropriately and confirm the access size is valid.

In fact, For multi-bit / non-correctable ECC events , do not assume a read/write can repair the data, you should treat it as data corruption and recover from a known-good source or reinitialize the affected memory as appropriate.

Hope it helps.

BR

Celeste

 

---------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!
---------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
6 Views
sean_dvorscak
Contributor III

One more question actually.

The automatic HW ECC correction functionality is enabled by default? I don't really see any bits in the MCM registers that would suggest it's a feature that can be disabled/enabled.

0 Kudos
Reply
17 Views
sean_dvorscak
Contributor III

Thanks for the confirmation and info.

And yes, I am handling uncorrectable bit errors differently.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2397895%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EKE1%20ECC%20RAM%20Single%20Bit%20Corrrection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397895%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHave%20a%20few%20questions%20regarding%20ECC.%3C%2FP%3E%3CP%3EI%20am%20currently%20using%20the%20MCM_LMFAR%20to%20determine%20where%20the%20ECC%20triggered%20a%20fault%20and%20then%20using%20that%20address%20to%20read%20then%20write%20back%20to%20correct%20it.%3C%2FP%3E%3CP%3EQuestions%3A%3C%2FP%3E%3CP%3E1.%20Does%20the%20ECC%20have%20the%20ability%20to%20autocorrect%20bits%3F%20Or%20do%20I%20really%20need%20to%20perform%20this%20read%2Fwrite%20to%20address%20to%20correct%3F%3C%2FP%3E%3CP%3E2.%26nbsp%3BIf%20there%20is%20not%20autocorrect%2C%20will%20I%20need%20to%20compensate%20for%20byte%20alignment%20when%20performing%20my%20read%2Fwrite%20correction%20mechanism%3F%20Currently%20I%20am%20performing%20a%204-byte%20read%2Fwrite%20at%20the%20address%20denoted%20by%20the%20MCM_LMFAR.%20I%20feel%20like%20this%20is%20dangerous%20as%20I%20am%20not%20sure%20the%20MCM_LMFAR%20will%20always%20show%20a%204-byte%20aligned%20address.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2397981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KE1%20ECC%20RAM%20Single%20Bit%20Corrrection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397981%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F90401%22%20target%3D%22_blank%22%3E%40sean_dvorscak%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20post.%3CBR%20%2F%3ECould%20you%20please%20let%20me%20know%20which%20specific%20device%20in%20the%20KE1%20family%20you%20are%20using%3F%3CBR%20%2F%3EThis%20will%20help%20me%20locate%20the%20relevant%20documentation%20more%20accurately%20or%20perform%20validation%20using%20the%20same%20device.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3ECeleste%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2398408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20KE1%20ECC%20RAM%20Single%20Bit%20Corrrection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2398408%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt's%20a%20KE18F512VLH16.%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E