This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: Error reading program flash

Part Number: TMS570LS3137

Hi,

I am developing a bootloader for the TMS570. I have the following memory map as shown in the linker file.

--retain="*(.intvecs)"

MEMORY
{
    BOOT_VECTORS (X)   : origin=0x00000000 length=0x00000020
    FLASH_API    (RX)  : origin=0x00000020 length=0x000014E0
    BOOTLOADER   (RX)  : origin=0x00001500 length=0x0007EB00
    APP_VECTORS  (RX)  : origin=0x00080000 length=0x00000020
    APP          (RX)  : origin=0x00080020 length=0x0027FFD0
    STACK        (RW)  : origin=0x08000000 length=0x00002FFF
    SRAM         (RW)  : origin=0x08003000 length=0x0003C000
}

SECTIONS
{
   .intvecs : {} > BOOT_VECTORS
   flashAPI :
   {
     ..\Debug__TI\flashdrv.obj (.text)

     --library= ../ext/F021_Flash_API_02.01.01/F021_API_CortexR4_BE_V3D16.lib (.text)
   } load = FLASH_API, run = SRAM, LOAD_START(api_load), RUN_START(api_run), SIZE(api_size)

   .text  > BOOTLOADER
   .const > BOOTLOADER
   .cinit > BOOTLOADER
   .pinit > BOOTLOADER
   .data  > SRAM
   .bss   > SRAM
}

I have the application loaded in the APP section of memory. While in the bootloader I am using the Flash API to read out the application but it fails every time on the same memory address 0x9D620. I see this error even in the Memory Browser in Code Composer at the same address. I can read everything in program flash up to the address in question. Can you think of any reason why this error might be happening?

Thanks for your time.

  • Hello Justin,

    1. What is the error? Is it a data abort? What are the value of ESM status registers?

    2. Is the application and its ECC programmed successfully?

    3. What is the size of your application image (find it in map file)?

    4. If you use CCS to program the application instead of using bootloader, are you able to read the value at 0x9D620?

  • Thanks for the quick response.

    1. The error is a group 1 and group 3 ESM error set as the following:

    FMC - uncorrectable error: bus1 and bus2 interfaces (does not include address parity error and errors on accesses to EEPROM bank)

    ESM Stat1 Reg = 0x40 ESM Stat3 Reg = 0x80

    2. I programmed the application with CCS and everything seems to run fine so I am assuming both the data and ECC were programmed correctly

    3. The length of the application is 0x1d5f4 bytes. Also in the map file it looks like the .cinit is located around 0x9d620. Not sure if that would have anything to do with it.

    4. I am unable to read 0x9d620 when I am debugging in the application or the bootloader.

  • Hello,

    The .cint of bootloader is mapped to BOOTLOADER. But the .cint of Application should be mapped to APP. The 0x9d620 is located in APP area.

    The error looks like a speculative fetch to a location with invalid ECC. The solution of speculative ECC error is:

    1. Using Linker CMD to generate ECC for whole flash for bootloader

    2. For application, if the application size is smaller than one flash sector, please append 0xFFFFFFFF to the application; then generate ECC using flash API.