SPRU513Y August 2001 – June 2022 SM320F28335-EP
In addition to specifying ECC memory ranges in the memory map, the linker command file must specify parameters for the algorithm that generates ECC data. You might need multiple ECC algorithm specifications if you have multiple Flash devices.
Each TI device supporting Flash ECC has exactly one set of valid values for these parameters. The linker command files provided with Code Composer Studio include the ECC parameters necessary for ECC support on the Flash memory accessible by the device. Documentation is provided here for completeness.
You specify algorithm parameters with the top-level ECC directive in the linker command file. The specification syntax is as follows:
ECC {
<algorithm name> : parity_mask = <8-bit integer>
mirroring = [ F021, F035 ]
address_mask = <32-bit mask>
}
For example:
MEMORY {
FLASH0 : origin=0x00000020 length=0x17FFE0
ECC_FLA0 : origin=0xf0400004 length=0x02FFFC ECC={ input_range=FLASH0 algorithm=F021 }
}
ECC { F021 : parity_mask = 0xfc
mirroring = F021 }
This ECC directive accepts the following attributes:
algorithm_name | Specify the name you would like to use for referencing the algorithm. |
address_mask = <32-bit mask> | This mask determines which bits of the address of each 64-bit piece of memory are used in the calculation of the ECC byte for that memory. Default is 0xffffffff, so that all bits of the address are used. (Note that the ECC algorithm itself ignores the lowest bits, which are always zero for a correctly-aligned input block.) |
parity_mask = <8-bit mask> | This mask determines which ECC bits encode even parity and which bits encode odd parity. Default is 0, meaning that all bits encode even parity. |
mirroring = F021 | F035 | This setting determines the order of the ECC bytes and their duplication pattern for redundancy. Default is F021. |