SPNA241 August 2019 RM41L232 , RM42L432 , RM44L520 , RM44L920 , RM46L430 , RM46L440 , RM46L450 , RM46L830 , RM46L840 , RM46L850 , RM46L852 , RM48L530 , RM48L540 , RM48L730 , RM48L740 , RM48L940 , RM48L950 , RM48L952 , RM57L843 , TMS570LC4357 , TMS570LC4357-EP , TMS570LC4357-SEP , TMS570LS0232 , TMS570LS0332 , TMS570LS0432 , TMS570LS0714 , TMS570LS0714-S , TMS570LS0914 , TMS570LS10106 , TMS570LS1114 , TMS570LS1115 , TMS570LS1224 , TMS570LS1225 , TMS570LS1227 , TMS570LS20206 , TMS570LS20206-EP , TMS570LS20216 , TMS570LS20216-EP , TMS570LS2124 , TMS570LS2125 , TMS570LS2134 , TMS570LS2135 , TMS570LS3134 , TMS570LS3135 , TMS570LS3137 , TMS570LS3137-EP
The Cortex-R4/R5 CPU may generate speculative fetches to any location within the ATCM memory space. A speculative fetch to a location with invalid ECC, which is subsequently not used, will not create an abort, but will set the ESM flags for a correctable or uncorrectable error. An uncorrectable error will unconditionally cause the nERROR pin to toggle low. Therefore, care must be taken to generate the correct ECC for the entire ATCM space including the holes between sections and any unused or blank flash areas.
The easiest way to achieve this is to use the Linker to generate ECC data rather than the loader. Couple changes should be made:
Once you make changes to linker command file so that the linker generates ECC for the project, it is necessary to change the loader settings so that the loader doesn't also try to generate ECC. On CCS “Flash Settings”, “Auto ECC Generation” should be unchecked, and “Flash Verification Settings” should be 'None'.
The following is a modified memory map of the linker command file used in the Cortex-R5 CAN bootloader project that you can use to replace the one generated by HALCoGen.
The ECC algorithm directive for Flash ECC devices should be added to generate ECC data.
/* Linker Settings */
--retain="*(.intvecs)"
/* Memory Map */
MEMORY
{
/* Add a vfill directive to the end of each line that maps to Flash */
VECTORS (X) : origin=0x00000000 length=0x00000020 vfill = 0xffffffff
FLASH0 (RX) : origin=0x00000020 length=0x001FFFE0 vfill = 0xffffffff
FLASH1 (RX) : origin=0x00200000 length=0x00200000 vfill = 0xffffffff
SRAM (RWX) : origin=0x08002000 length=0x0002D000
STACK (RW) : origin=0x08000000 length=0x00002000
/* USER CODE BEGIN (3) */
#if 1
/* Add memory regions corresponding to the ECC area of the flash bank */
ECC_VEC (R) : origin=(0xf0400000 + (start(VECTORS) >> 3))
length=(size(VECTORS) >> 3)
ECC={algorithm=algoL2R5F021, input_range=VECTORS}
ECC_FLA0 (R) : origin=(0xf0400000 + (start(FLASH0) >> 3))
length=(size(FLASH0) >> 3)
ECC={algorithm=algoL2R5F021, input_range=FLASH0 }
ECC_FLA1 (R) : origin=(0xf0400000 + (start(FLASH1) >> 3))
length=(size(FLASH1) >> 3)
ECC={algorithm=algoL2R5F021, input_range=FLASH1 }
#endif
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
/* Add an ECC {} directive describing the algorithm that matches the device */
ECC
{
algoL2R5F021 : address_mask = 0xfffffff8 /*Address Bits 31:3 */
hamming_mask = R4 /*Use R4/R5 build in Mask */
parity_mask = 0x0c /*Set which ECC bits are Even & Odd parity */
mirroring = F021 /*RM57Lx and TMS570LCx are build in F021*/
}
/* USER CODE END */