How does Flash Error Correcting Code (ECC) work in Infineon TC29x Microcontroller ?

naseeam used Ask the Experts™
We are using TC29x Microcontroller. The flash size is 6Mbytes. There are Three banks, 2Mbyte each.

Program Flash 0 (PF0) is bank 1. Program Flash 1 (PF1) is bank 2. Program Flash 2 (PF2) is bank 3.

 PF0 address range is: 0x8000 0000 - 0x801F FFFF
 PF1 address range is: 0x8020 0000 - 0x803F FFFF
 PF2 address range is: 0x8040 0000 - 0x805F FFFF

 Where is Program Flash ECC stored. Is it within 6Mbyte ? Or is there additional storage space for ECC that we don't have access to ?

 How does Flash ECC work ? For how many bytes of data, how many bytes of ECC are there ? Whenever we write to flash, ECC updates? When we erase flash ECC updates?

 How is it possible to create Flash ECC Error ? Because everytime you write or erase flash, ECC will update?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dr. KlahnPrincipal Software Engineer

This is fairly detailed technical information and I would suggest consulting the technical specification for the part to get that information.  If it's not disclosed in the technical specification, the only place to get that information would be from the manufacturer's engineering support department.
I agree with Dr K!
Why do you need this info?


I need this information because I need to test ECC circuitry by creating ECC Errors.
Principal Software Engineer
I suggest consulting a digital engineering textbook first so that you can ask the right questions of the manufacturer.  Hamming codes are the classical error correcting code but they are by no means the only ECC code.  The codes optimized for random bit errors are not optimal for burst errors and vice versa.

The depth of correction is limited under all reasonable quality assumptions - some flash will always be reject grade and therefore worse than can be corrected no matter how deep the correction may be.  It is cheaper to throw away bad flash than to ask a controller to make it look like flash that is 10% usable.

Regarding testing ECC circuitry -- don't get me wrong here -- it'd probably be an interesting job for an intern or a co-op student, but why go to that effort?  The manufacturer did that testing during the design phase so that customers don't have to.  It's an off-the-shelf part, not an ASIC, so the internal circuitry and algorithms are fixed in silicon.  Like all off-the-shelf parts you have to trust the manufacturer's engineering that the part works according to the published spec.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial