NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation

From Texas Instruments Wiki
Jump to: navigation, search
{{#switchcategory:MSP430=<McuHitboxHeader/>|C2000=<McuHitboxHeader/>|Stellaris=<McuHitboxHeader/>|TMS570=<McuHitboxHeader/>|MCU=<McuHitboxHeader/>|MAVRK=<MAVRKHitboxHeader/>|<HitboxHeader/>}}

Motivation[edit]

For the TMS570LC4357 and RM57L843 devices, ECC protection of Flash and SRAM memories is always enabled. This differs from Hercules devices in the TMS570LS and RM4 series where ECC is disabled after reset and remains disabled until enabled by software. Generally this is a good thing!

But it also means that it is a lot more likely that you will see the RED ERR LED go on during development. A common reason for this to occur is that erased flash is full of ECC errors! So if you erase the entire (4MByte) flash, then program a tiny "Hello World" into the part, most of the flash will still contain ECC errors. All it takes to trip the RED error LED is a read from an area of flash left with ECC errors. This can happen intentionally (say you run a CRC over the entire 4MBytes - even though you're not using it) or it can happen unintentionally (the CPU performs speculative pre-fetches).

The Solution[edit]

The solution to frequent ECC related errors during development is avoid them by making sure all of the ECC data is programmed - in other words program correct ECC values even for the locations in the main flash array that are left unused.

The easiest way to achieve this is to use the Linker to generate ECC data rather than the loader.

This can be accomplished by changing:

  1. The Linker Command File
  2. The Flash Loader Settings for your Project

Changes to the Linker Command File[edit]

If your linker command file has not already been updated (as of 5/28/2015 this includes the default linker command files shipped with HALCoGen). You will want to make the following changes.

  1. Add a 'vfill = 0xFFFFFFFF' directive to the end of each line that maps to Flash in the Memory{} section of the command file.
  2. Add memory regions corresponding to the ECC area of the flash bank to the Memory{} section
  3. Add an ECC {} directive describing the algorithm that matches the device

The first change, the addition of the 'vfill', affects only the ECC generation. It instructs the ECC generator to treat the flash as if it were filled with the value 0xFFFFFFFF. It's a virtual fill, because the loader doesn't need to download 4MBytes - Your Program Size of 0xFFFFFFFF if it erases the flash first (since the erased state *is* 0xFFFFFFFF).

The second change tells the linker how to create the data for the ECC area of flash. The 'origin' is the area of the device memory map where you can read and program the ECC values directly. The input range specifies the data over which ECC is calculated.

Finally the ECC{} directive just has a description of the algorithm that the linker needs to use; different TI parts are designed with slightly different ECC equations.

Here's a modified linker command file that you can use in place of the one provided by HALCoGen. Actually it is the linker command file from HALCoGen, with the changes described above entered in the /* USER CODE */ blocks so that they will be preserved even if you regenerate your project.

Changes to CCS Flash Loader Settings[edit]

Once you make the changes to your linker command file so that the linker generates ECC for your project, it is necessary to change the loader settings so that the loader doesn't also try to generate ECC. Also verification during programming needs to be skipped because the data areas and ECC areas will now be programmed in separate steps.

You can access these settings in your project properties, under the Debug category. Select "Flash Settings" as shown below and make sure:

  • System Reset on Connect is checked
  • Auto ECC Generation is unchecked
  • Align program segments to 64-bit memory regions is checked
  • Flash Verification Settings should be 'None'
  • Perform Blank Check before Program Load must be unchecked
  • Remember to Press "APPLY" or your changes will not be saved!

Flash Settings for use with Linker Generated ECC

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article LAUNCHXL2-570LC43-RM57L: LinkerECCRecommendation here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity

{{#switchcategory:MSP430=<McuHitboxFooter/>|C2000=<McuHitboxFooter/>|Stellaris=<McuHitboxFooter/>|TMS570=<McuHitboxFooter/>|MCU=<McuHitboxFooter/>|MAVRK=<MAVRKHitboxFooter/>|<HitboxFooter/>}}