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.

TMS320F280025C: Error during Flash Programming. Address 0x0008903

Part Number: TMS320F280025C
Other Parts Discussed in Thread: UNIFLASH

Hi there,

I am debugging some code and at a certain point when I compile and flash the code I get the console error "Error during Flash Programming. Address 0x0008903" I have tried modifying my linker file (attached) to use a different sector but the error address of "0x0008903" simply changes to the new sector address.  

The code changes I am making are unrelated to flash programming and I am not doing any custom flash writing, I am simply uploading the code the normal "debug" way. Note that if I roll back my minor code changes to before this problem started occuring then the issue goes away completely. I am therefore concluding this is not a hardware issue. 

The problem seems to start occur when sector 4 gets full. This is the memory map when it is still working okay (when sector 4 reaches 100% the problem seems to start occuring):

  

Appreciate any help!

  • Linker: 

    MEMORY
    {
    BEGIN : origin = 0x080000, length = 0x000002
    BOOT_RSVD : origin = 0x00000002, length = 0x00000126
    RAMM0 : origin = 0x00000128, length = 0x000002D8
    RAMM1 : origin = 0x00000400, length = 0x000003F8 /* on-chip RAM block M1 */
    // RAMM1_RSVD : origin = 0x000007F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    /* RAMLS4 : origin = 0x0000A000, length = 0x00000800
    RAMLS5 : origin = 0x0000A800, length = 0x00000800
    RAMLS6 : origin = 0x0000B000, length = 0x00000800
    RAMLS7 : origin = 0x0000B800, length = 0x00000800*/

    /* Combining all the LS RAMs */
    RAMLS4567 : origin = 0x0000A000, length = 0x00002000
    RAMGS0 : origin = 0x0000C000, length = 0x000007F8
    // RAMGS0_RSVD : origin = 0x0000C7F8, length = 0x00000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */


    // FLASHBANK1 : origin = 0x00080000, length = 0x0000FFF0
    // FLASH_BANK1_RSVD : origin = 0x0008FFF0, length = 0x00000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
    BOOTROM : origin = 0x003F0000, length = 0x00008000
    BOOTROM_EXT : origin = 0x003F8000, length = 0x00007FC0
    RESET : origin = 0x003FFFC0, length = 0x00000002
    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_SEC0 : origin = 0x080002, length = 0x000FFE /* on-chip Flash */
    FLASH_BANK0_SEC1 : origin = 0x081000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC2 : origin = 0x082000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC3 : origin = 0x083000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC4 : origin = 0x084000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC5 : origin = 0x085000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC6 : origin = 0x086000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC7 : origin = 0x087000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC8 : origin = 0x088000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC9 : origin = 0x089000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */
    FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x000FF0 /* on-chip Flash */
    // FLASH_BANK0_SEC15_RSVD : origin = 0x08FFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

    }


    SECTIONS
    {
    codestart : > BEGIN, ALIGN(8)
    .text : >> FLASH_BANK0_SEC1 | FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4 | FLASH_BANK0_SEC5 | FLASH_BANK0_SEC6 | FLASH_BANK0_SEC7, ALIGN(8)
    .cinit : > FLASH_BANK0_SEC0, ALIGN(8)
    .switch : > FLASH_BANK0_SEC0, ALIGN(8)
    .reset : > RESET, TYPE = DSECT /* not used, */

    .stack : > RAMM1

    // .init_array : > FLASH_BANK0_SEC1, ALIGN(8) //ss not used for some reason
    .bss : > RAMLS4567
    .bss:output : > RAMLS4567
    .bss:cio : > RAMGS0
    .const : >> FLASH_BANK0_SEC9| FLASH_BANK0_SEC10, ALIGN(8) //SS problem with sector 9
    .const2 : > FLASH_BANK0_SEC0, ALIGN(8)
    .const3 : > FLASH_BANK0_SEC0, ALIGN(8)
    .data : > RAMLS4567
    .sysmem : > RAMLS4567

    ramgs0 : > RAMGS0

    /* Allocate IQ math areas: */
    IQmath : > RAMLS4567
    IQmathTables : > RAMLS4567

    .TI.ramfunc : LOAD = FLASH_BANK0_SEC0, //was sec1
    RUN = RAMGS0,
    LOAD_START(RamfuncsLoadStart),
    LOAD_SIZE(RamfuncsLoadSize),
    LOAD_END(RamfuncsLoadEnd),
    RUN_START(RamfuncsRunStart),
    RUN_SIZE(RamfuncsRunSize),
    RUN_END(RamfuncsRunEnd),
    ALIGN(8)

    }
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

  • Hello Steven,

    A few questions.

    • Is this a custom board design, or are you using a control card or LaunchPad? If not, can you confirm that you still get the same error when using one of these boards?
    • Have you made any changes to the CCS Flash plugin settings (Debug Configurations > Target > Flash Settings)? In particular, ensure that "Erase and Program" is selected, and under Erase settings, Entire Flash is selected.
    • Have you configured the DCSM/programmed the user OTP with any security settings? If so, you may need to confirm the address boundaries assigned to the security zone(s).

    I would also be interested to see your output .map file, to inspect what symbols/code region is being affected at the sector 4 boundary.

  • Hi Ibukun,

    Thanks for your reply. I have not made any changes to the plugin settings and "Erase and Program" is selected. "Entire flash" is also selected.

    This is a custom board design and I am flashing with an external XDS100V3. Today I tried flashing the code on the TI launchpad and it worked no problem. I then flashed the code on my spare prototype and it also worked no problem. It appears this single device is damaged somehow.

    I need to figure out the reason why this device memory suddenly stopped being able to be flashed as I am close to a production run. I think it is possible I turned off the power during flashing at one point. Do you think this could cause this kind of damage? Is there any possible procedure I can do to wipe/recover this device? 

    Any other ideas? I am fairly certain my uC power supply setup is solid as I have previously been through a design review stage with TI on this PCB.

    Many thanks!

    Steven

  • The error now also states:
    C28xx_CPU1: Error during Flash Programming. Address 0x00089038, FMSTAT (STATCMD on some devices) 0x00000030
    C28xx_CPU1: File Loader: Memory write failed: Unknown error
    C28xx_CPU1: GEL: File: C:\Users\Steven\workspace_v11\HW2-2\CPU1_FLASH\HW2-2.out: Load failed.
    C28xx_CPU1: Error during Flash Programming. Address 0x0008A5D0, FMSTAT (STATCMD on some devices) 0x00000030
    C28xx_CPU1: Please make sure the memory location you are programming have not already been programmed.

  • OK, that is a little helpful. It's getting an invalid data error, which suggests that a bit that was supposed to be 1 is reading back as 0. So I suspect at least one bit is not properly erased or has been driven into depletion. This may have happened due to power interruption during erase/programming.

    Can you try using UniFlash to erase the Flash? After each erase iteration, do a blank check, and make sure you get a successful blank check before attempting to program the device again.

    Best regards,
    Ibukun

  • Hi Ibukun, it works! An unsuccessful erase procedure was causing the problems. For some reason Uniflash was able to erase the device properly while the standard CCS tool/procedure was not. Strange as you would think they use the same erase process. Anyhow thanks for helping me save this device!