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.

TMS320F28P650DK: CCS report: Error during flash programming

Part Number: TMS320F28P650DK
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hi Expert

Customer report that CCS will report the below issue during F28P65 program download:

The CCS version is 12.8.1, emulator version is xds100v2, cmd file is attached:

MEMORY
{
BEGIN            : origin = 0x080000, length = 0x000008  // Update the codestart location as needed
BOOT_RSVD        : origin = 0x000002, length = 0x0001AF     /* Part of M0, BOOT rom will use this for stack */
//RAMM0            : origin = 0x0001B1, length = 0x00024F
//RAMM1            : origin = 0x000400, length = 0x000400
RAMM1            : origin = 0x0001B1, length = 0x00064F
RAMD_DATA1       : origin = 0x00C000, length = 0x004000
RAMD_DATA2       : origin = 0x01A000, length = 0x008000
RAMLS_Prog       : origin = 0x008000, length = 0x003000
RAMLS6           : origin = 0x00B000, length = 0x000800
RAMLS7           : origin = 0x00B800, length = 0x000800
RAMLS8           : origin = 0x022000, length = 0x002000  // When configured as CLA program use the address 0x4000
RAMLS9           : origin = 0x024000, length = 0x002000  // When configured as CLA program use the address 0x6000
RAMGS_Prog       : origin = 0x010000, length = 0x006000
RAMGS3           : origin = 0x016000, length = 0x002000
RAM_data         : origin = 0x018000, length = 0x001C00
RAM_DMA1 		: origin = 0x019C00, length = 0x000100
RAM_DMA2 		: origin = 0x019D00, length = 0x000100
RAM_DMA3 		: origin = 0x019E00, length = 0x000100
RAM_DMA4 		: origin = 0x019F00, length = 0x000100
/* Flash Banks (128 sectors each) */
FLASH_IAP_CODE   : origin = 0x080008, length = 0x0FFF8
FLASH_IAP_DATA   : origin = 0x090000, length = 0x10000
APP_HEAD_KEY     : origin = 0x0A0000, length = 0x00008
FLASH_APP_ENTRY  : origin = 0x0A0008, length = 0x00008
FLASH_APP_CODE   : origin = 0x0A0010, length = 0x3FBE8
APP_END_KEY      : origin = 0x0DFBF8, length = 0x00008
APP_STORE_ID     : origin = 0x0DFC00, length = 0x00400
CPU1TOCPU2RAM    : origin = 0x03A000, length = 0x000400
CPU2TOCPU1RAM    : origin = 0x03B000, length = 0x000400
CLATOCPURAM      : origin = 0x001480,   length = 0x000080
CPUTOCLARAM      : origin = 0x001500,   length = 0x000080
CLATODMARAM      : origin = 0x001680,   length = 0x000080
DMATOCLARAM      : origin = 0x001700,   length = 0x000080
CANA_MSG_RAM     : origin = 0x049000, length = 0x000800
CANB_MSG_RAM     : origin = 0x04B000, length = 0x000800
RESET            : origin = 0x3FFFC0, length = 0x000002
}
SECTIONS
{
.text            : > FLASH_APP_CODE, ALIGN(8)
.cinit           : > FLASH_APP_CODE, ALIGN(8)
.switch          : > FLASH_APP_CODE, ALIGN(8)
.reset           : > RESET, TYPE = DSECT /* not used, */
bootstart        : > BEGIN
codestart        : > FLASH_APP_ENTRY
APP_HEAD         : > APP_HEAD_KEY
APP_END          : > APP_END_KEY
IAP_DATA         : > FLASH_IAP_DATA
IAP_CODE         : > FLASH_IAP_CODE
.stack           : > RAMM1
#if defined(TI_EABI)
.bss             : > RAMD_DATA2
.bss:output      : > RAMD_DATA1
.data            : > RAMGS3
.sysmem          : > RAMD_DATA1
.init_array      : > FLASH_APP_CODE, ALIGN(8)
.const           : > FLASH_APP_CODE, ALIGN(8)
#else
.pinit           : > FLASH_APP_CODE, ALIGN(8)
.econst          : > FLASH_APP_CODE, ALIGN(8)
.ebss            : > RAMD_DATA2
.esysmem         : > RAMD_DATA1
#endif
RamDataD : > RAM_data, type=NOINIT
ADCAData : > RAM_DMA1, type=NOINIT
ADCBData : > RAM_DMA2, type=NOINIT
ADCCData : > RAM_DMA3, type=NOINIT
ADCDData : > RAM_DMA4, type=NOINIT
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM, type=NOINIT
MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM, type=NOINIT
#if defined(TI_EABI)
.TI.ramfunc : {} LOAD = FLASH_APP_CODE,
RUN = RAMGS_Prog,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASH_APP_CODE,
RUN = RAMGS_Prog,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif
/* CLA specific sections */
#if defined(TI_EABI)
/* CLA specific sections /
Cla1Prog        : LOAD = FLASH_APP_CODE,
RUN = RAMLS_Prog,
LOAD_START(Cla1ProgLoadStart),
RUN_START(Cla1ProgRunStart),
LOAD_SIZE(Cla1ProgLoadSize),
ALIGN(4)
#else
/ CLA specific sections */
Cla1Prog        : LOAD = FLASH_APP_CODE,
RUN = RAMLS_Prog,
LOAD_START(_Cla1ProgLoadStart),
RUN_START(_Cla1ProgRunStart),
LOAD_SIZE(_Cla1ProgLoadSize),
ALIGN(4)
#endif
Cla1ToCpuMsgRAM  : > CLATOCPURAM
CpuToCla1MsgRAM  : > CPUTOCLARAM
#ifdef CLA_C
// CLA C compiler sections
// Must be allocated to memory the CLA has write access to
.scratchpad      : > RAMLS6
.bss_cla         : > RAMLS6
cla_shared       : > RAMLS6
#endif
#if defined(TI_EABI)
.const_cla      : LOAD = FLASH_APP_CODE,
RUN = RAMLS6,//RAMLS1,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize),
ALIGN(4)
#else
.const_cla      : LOAD = FLASH_APP_CODE,
RUN = RAMLS6,//RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize),
ALIGN(4)
#endif
CLA1mathTables    : > RAMLS7
//Load tables to Flash and copy over to RAM
#if defined(TI_EABI)
CLA1mathTables    :  LOAD = FLASH_APP_CODE,
RUN = RAMLS7,
RUN_START(CLA1mathTablesRunStart),
LOAD_START(CLA1mathTablesLoadStart),
LOAD_SIZE(CLA1mathTablesLoadSize)
#else
CLA1mathTables    :  LOAD = FLASH_APP_CODE,
RUN = RAMLS7,
RUN_START(_CLA1mathTablesRunStart),
LOAD_START(_CLA1mathTablesLoadStart),
LOAD_SIZE(_CLA1mathTablesLoadSize)
#endif
}

the same output file can be downloaded with xds110 USB + CCS properly, and with xds100v2+UNIFLASH8.5.0 properly.

before dowload, if verify the device with UNIFLASH, the UNIFLASH+XDS100V2 will report error:

but the program can be downloaded successfully:

I think it may be the compatible issue between xds100v2 and F28P65, Could you please help to recommend the emulator and standard program process for F28P65?

Thanks

Joe

  • Hi Joe,

    The XDS100v2 should be compatible with the F28P65x device. You can confirm JTAG signal integrity by testing the connection (see chapter 3): https://www.ti.com/lit/spracf0c

    Looking at the value of the STATCMD register provided and referencing the F28P65x Flash API Reference Guide, it seems like the flash wasn't erased before programming. This is also stated by the CCS error message. Can you confirm that the necessary flash sectors are set to be erased before attempting to program (once connected to the device, go to Tools > On-Chip Flash)?

    Best,

    Matt

  • Hi Matt

    Thanks for your reply, yes the flash sector at 0x0C0000 seems not erased properly, we do the test below:

    1. erase all on chip flash with CCS, and program the firmware with xds100v2+ccs12.8.1 issue still been reported, below picture shows the on-chip flash is not erased correctly:

    2. erase all on chip flash with UNIFLASH, and program the firmware with xds100v2+ccs12.8.1 there is no issue been reported, below picture shows the on-chip flash is erased correctly:

    So I think the root cause should be with CCS12.8.1 + XDS100V2, the flash bank 2 cannot be erased correctly.

    Could you please help to try on your side with xds100v2 to see whether the issue can be reproduced?

    Thanks

    Joe

  • Hi Joe,

    I can confirm that I've been able to observe the same issue with CCS v12.8.1 and an XDS100v2. I will be discussing this with the Flash team and provide an update as soon as possible.

    Best,

    Matt

  • Hi Joe,

    This issue was fixed in CCS versions after 12.8.1, so CCS v20 and UniFlash v9.1 should have this resolved.

    Since CCS updates are not going back to v12, if you wish to stay with CCS v12, you need to replace the DLL file in that version of CCS.

    • In UniFlash: C:\ti\uniflash_9.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\bin\FlashC2000v1.dll

    • In CCS: C:\ti\ccs1281\ccs\ccs_base\DebugServer\bin\FlashC2000v1.dll

    Best,

    Matt

  • Hi Matt

    Thanks for your confirmation, Can I understand that I can simply replace the ccs1281 FlashC2000v1.dll file with uniflash_9.1.0 FlashC2000v1.dll, then CCS12.8 can work properly? but customer feedback that action cannot work on his side. Could you share your steps to fix and verify the function with CCS12.8?

    Thanks

    Joe

  • Hi Joe,

    Did the customer also run fsclean.bat (ccs1281\ccs\ccs_base\common\bin\fsclean.bat) to clear temporary files?

    Best,

    Matt

  • Hi Matt

    Yes, it still not work after clearing the temporary files, I will follow up this thread through email to see whether we can book a webex meeting on Friday to look into this issue.

    Thanks

    Joe

  • Hi Joe,

    Yes, let's take this offline. I will keep this thread closed for now.

    Best,

    Matt

  • Hi Matt

    Thanks for your sharing offline, I also update the E2E thread to show this workaround for other users:

    1. In ccs1281\ccs\ccs_base\c2000\nowFlash\configs, replace the following flash configuration xml’s with the updated files from CCS v20.1.1 (attached)
      1. nowFlashConfig.xml
      2. NowFlashLibraries.xml
      3. TMS320F28P65x.xml
      4. TMS320F28P65x.CPU1.xml
      5. TMS320F28P65x.CPU2.xml
    2. Run fsclean.bat (ccs1281\ccs\ccs_base\common\bin)

    Thanks

    joe