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.

TMS320F28377D: C2000Ware Serial Flash Programmer FMSTAT Error with DCSM Reserved Memory

Part Number: TMS320F28377D
Other Parts Discussed in Thread: UNIFLASH, C2000WARE

Hi,

I am using C2000 Ware serial flash programmer utility to download .hex file.

Here is my linker file:

MEMORY
{
PAGE 0 : /* Program Memory */

/* Z1 OTP. LinkPointers */
DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x000020
// DCSM_OTP_Z1_LINKPOINTER : origin = 0x78000, length = 0x000030
/* Z1 OTP. PSWDLOCK/RESERVED */
// DCSM_OTP_Z1_PSWDLOCK : origin = 0x78010, length = 0x000004
/* Z1 OTP. CRCLOCK/RESERVED */
// DCSM_OTP_Z1_CRCLOCK : origin = 0x78014, length = 0x000004
/* Z1 OTP. RESERVED/BOOTCTRL */
// DCSM_OTP_Z1_align18 : origin = 0x78018, length = 0x000008
// DCSM_OTP_Z1_BOOTCTRL : origin = 0x7801C, length = 0x000004

/* DCSM Z1 Zone Select Contents (!!Movable!!) */
/* Z1 OTP. Z1 password locations / Flash and RAM partitioning */
DCSM_ZSEL_Z1_P0 : origin = 0x78020, length = 0x000010
DCSM_ZSEL_Z1_P1 : origin = 0x78030, length = 0x000010
DCSM_ZSEL_Z1_P2 : origin = 0x78040, length = 0x000010

DCSM_ZSEL_Z1_P3 : origin = 0x78050, length = 0x000010
DCSM_ZSEL_Z1_P4 : origin = 0x78060, length = 0x000010
DCSM_ZSEL_Z1_P5 : origin = 0x78070, length = 0x000010
DCSM_ZSEL_Z1_P6 : origin = 0x78080, length = 0x000010
DCSM_ZSEL_Z1_P7 : origin = 0x78090, length = 0x000010
DCSM_ZSEL_Z1_P8 : origin = 0x780A0, length = 0x000010
DCSM_ZSEL_Z1_P9 : origin = 0x780B0, length = 0x000010
DCSM_ZSEL_Z1_P10 : origin = 0x780C0, length = 0x000010
/* Z2 OTP. LinkPointers */
DCSM_OTP_Z2_LINKPOINTER : origin = 0x78200, length = 0x00000C
/* Z2 OTP. GPREG1/GPREG2 */
// DCSM_OTP_Z2_GPREG : origin = 0x7820C, length = 0x000004
/* Z2 OTP. PSWDLOCK/RESERVED */
// DCSM_OTP_Z2_PSWDLOCK : origin = 0x78210, length = 0x000004
/* Z2 OTP. CRCLOCK/RESERVED */
// DCSM_OTP_Z2_CRCLOCK : origin = 0x78214, length = 0x000004
/* Z2 OTP. GPREG3/BOOTCTRL */
// DCSM_OTP_Z2_BOOTCTRL : origin = 0x7821C, length = 0x000004

/* DCSM Z1 Zone Select Contents (!!Movable!!) */
/* Z2 OTP. Z2 password locations / Flash and RAM partitioning */
DCSM_ZSEL_Z2_P0 : origin = 0x78220, length = 0x000010

}

SECTIONS
{
dcsm_otp_z1_linkpointer : > DCSM_OTP_Z1_LINKPOINTER PAGE = 0//, type = DSECT
/* dcsm_otp_z1_pswdlock : > DCSM_OTP_Z1_PSWDLOCK PAGE = 0//, type = DSECT
dcsm_otp_z1_crclock : > DCSM_OTP_Z1_CRCLOCK PAGE = 0//, type = DSECT
*/

// dcsm_otp_z1_bootctrl : > DCSM_OTP_Z1_BOOTCTRL PAGE = 0//, type = DSECT

// dcsm_zsel_z1_78018 : > DCSM_OTP_Z1_align18
dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0 PAGE = 0//, type = DSECT
// dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P1 PAGE = 0//, type = DSECT

dcsm_otp_z2_linkpointer : > DCSM_OTP_Z2_LINKPOINTER PAGE = 0, type = DSECT
/* dcsm_otp_z2_pswdlock : > DCSM_OTP_Z2_PSWDLOCK PAGE = 0, type = DSECT
dcsm_otp_z2_crclock : > DCSM_OTP_Z2_CRCLOCK PAGE = 0, type = DSECT
dcsm_otp_z2_bootctrl : > DCSM_OTP_Z2_BOOTCTRL PAGE = 0, type = DSECT
dcsm_zsel_z2 : > DCSM_ZSEL_Z2_P0 PAGE = 0, type = DSECT
*/
}

Here is my DCSM Zone1 setup:

.sect "dcsm_otp_z1_linkpointer"
.retain
; .long 0x1FFFFE00 ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P9
.long 0x1FFFFFFF ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
; .long 0x1FFFFFFE ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P1
.long 0xFFFFFFFF ;Reserved
; .long 0x1FFFFE00 ;Z1-LINKPOINTER2,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P9
.long 0x1FFFFFFF ;Z1-LINKPOINTER2,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
; .long 0x1FFFFFFE ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P1
.long 0xFFFFFFFF ;Reserved
; .long 0x1FFFFE00 ;Z1-LINKPOINTER3,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P9
.long 0x1FFFFFFF ;Z1-LINKPOINTER3,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
; .long 0x1FFFFFFE ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P1
.long 0xFFFFFFFF ;Reserved

;reserved 0x...0C-0F
.long 0xFFFFFFFF ;Reserved
.long 0xFFFFFFFF ;Reserved

; .sect "dcsm_otp_z1_pswdlock", 0x...10
.long 0xFFFFFF00 ;Z1-PSWDLOCK
.long 0xFFFFFFFF ;Reserved

; .sect "dcsm_otp_z1_crclock", 0x...14
.long 0x0F0FFFFF ;Z1-CRCLOCK, Not all Fs
.long 0xFFFFFFFF ;Reserved

; .sect "dcsm_zsel_z1_78018"
.long 0xFFFFFFFF ;Reserved
.long 0xFFFFFFFF ;Reserved, 0x...1A-1B
; .sect "dcsm_otp_z1_bootctrl"
.long 0xFFFFFFFF ;Reserved,0x...1C-1D
.long 0x00000B5A ;Z1-BOOTCTRL, 0x... 1E

There is no problem program the DSP with uniflash.

But failed when use 'serial_flash_programmer'. Here is the error with Address 0x78018.

Please advise,

Best Regards,

Lily

  • Hi Lily,

    What version of C2000Ware did you encounter this error from? 

    Thanks and regards,

    Charles

  • Hi Charles,

    The version C2000 is C2000Ware_5_01_00_00.

    Thank you!

    Best Regards,

    Lily

  • Hi Lily,

    For the following address range (0x78018 ~ 0x7801B) is detected by the flash tool, it will not program and instead issue an error, causing the failure. 
    Can you try recompiling the project and avoiding these locations in the hex file?

    Thanks and regards,

    Charles

  • Hi Charles,

    Yes, I agree with you I need to avoid address (0x78018 ~ 0x7801B), but I don't know how to do it (I've included the linker and pointer file in my first post). Please advise.

    Best Regards,

    Lily

  • Hi Lily,

    I see the locations are commented out, is anything assigned to those specific location sections in your project build?

    Remove entirely the .sect for the mentioned location sections and rebuild the project. Let me know if this changes the download. 

    Thanks and regards,

    Charles

  • Hi Charles,

    The section locations are not commented out, the Zone1 DCSM pointers and bootctrl are defined in this sec.

    Here is the code with all the comments removed.

    .sect "dcsm_otp_z1_linkpointer"
    .retain
    .long 0x1FFFFFFF ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved

    .long 0x1FFFFFFF ;Z1-LINKPOINTER2,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved

    .long 0x1FFFFFFF ;Z1-LINKPOINTER3,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFFFF ;Reserved
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFF00 ;Z1-PSWDLOCK
    .long 0xFFFFFFFF ;Reserved


    .long 0x0F0FFFFF ;Z1-CRCLOCK, Not all Fs
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFFFF ;Reserved
    .long 0xFFFFFFFF ;Reserved, 0x...1A-1B


    .long 0xFFFFFFFF ;Reserved,0x...1C-1D
    .long 0x00000B5A ;Z1-BOOTCTRL, 0x... 1E

    Thanks,

    Lily

  • Hi Lily,

    Yes, what are the results of the making the above changes and programming with the host programmer?

    Thanks and regards,

    Charles

  • Hi Charles,

    Here is the result:

    Best Regards,

    Lily

  • Hi Charles,

    I just wanted to know how to keep the data buffer length 128bit and avoid address (0x78018 ~ 0x7801B).

    Best Regards,

    Lily

  • Hi Lily,

    One way to keep the data buffer length at 128bit aligntment is to use the ALIGN(8) directive at the sections for your linker cmd file. An example of this can be found in the blinky example project (Flash configuration):

    Another option that may provide help is with the following link, which shares details on setting the --boot_block_size option for the hex2000 utility. 

    (1) TMS320F28388S: PROGRAM_ERROR when trying to flash with serial programmer - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums

    Thanks and regards,

    Charles

  • Hi Charles,

    Yes, I agree with you, I have already implemented --boot_block_size option, and align(8), but these are for the Flash memory, not for DCSM OTP area.

    Please advise how to avoid address (0x78018 ~ 0x7801B) in the following:

    sect "dcsm_otp_z1_linkpointer"
    .retain
    .long 0x1FFFFFFF ;Z1-LINKPOINTER1,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved

    .long 0x1FFFFFFF ;Z1-LINKPOINTER2,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved

    .long 0x1FFFFFFF ;Z1-LINKPOINTER3,when dcsm_zsel_z1 is DCSM_ZSEL_Z1_P0
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFFFF ;Reserved
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFF00 ;Z1-PSWDLOCK
    .long 0xFFFFFFFF ;Reserved


    .long 0x0F0FFFFF ;Z1-CRCLOCK, Not all Fs
    .long 0xFFFFFFFF ;Reserved


    .long 0xFFFFFFFF ;Reserved
    .long 0xFFFFFFFF ;Reserved, 0x...1A-1B


    .long 0xFFFFFFFF ;Reserved,0x...1C-1D
    .long 0x00000B5A ;Z1-BOOTCTRL, 0x... 1E

    Best Regards,

    Lily

  • Hi Lily,

    I'll need to review this issue with my team and get back to you by Monday.

    Thanks and regards,

    Charles

  • Hi Charles,

    Any update?

    Best Regards,

    Lily

  • Hi Lily,

    Sorry for any confusion.

    Charles asked me to take a look at this post.  The current Flash API blocks the program operation for the JTAGLOCK location.  Also, the SCI flash kernel programs 128-bits at once - In your case, the aligned 128-bits are of the address range 0x78018 to 0x7801F.  Flash API when it sees the address 0x78018, it simply errors out since it is JTAGLOCK location.  This is what you are observing.  If the flash kernel has the capability to program 64-bits, this issue would not occur.  However, as I said, flash kernel is programming 128-bits at-a-time.  

    There are two ways to fix this:

    1) Modify flash kernel to be able to program 64-bits when it sees the address 0x7801C to 0x7801F.

    Or

    2) We have to release a flash API that allows programming of JTAGLOCK location.  We anyways decided to allow users to program the JTAGLOCK location recently.  In this case, you can simply map all 0xFFFFFFFF data to the JTAGLOCK location since you don't want to activate it.  We plan to release this new flash API in March.  

    Up to when can you wait on this?  If this is urgent, we can try to provide a beta for you in a week or two.  And you can move to the final version when we release the next C2000ware in March.

    Please let us know.

    Thanks and regards,

    Vamsi

  • Thank you Vamsi!

    I prefer the first fix (modify flash kernel to be able to program 64-bits when it sees the address 0x7801C to 0x7801F). 

    We will wait for next C2000ware release in March.

    Best Regards,

    Lily