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.

TMS320F28377S: DCSM Error.

Part Number: TMS320F28377S
Other Parts Discussed in Thread: C2000WARE

dear team my DCSM error occur,
please share what is the error
i tried to perform OTA
the file generated by dcsm_security_tool.
Fresh_mcu_tempelate.JPG error_fresh_mcu_data_At_0x1071000.JPG

error_fresh_mcu_data_At_0x78000.JPG

  • Hello,

    Can you provide more details on your flash programming flow? How many bits are you programming at a time? The dcsm.asm/dcsm.cmd memory sections are not aligned to 128-bit aligned addresses, so that could cause issues during programming. 

    Best, 

    Matt

  • first i upload flash kernel( provided by TI)
    on successful hand shake i start uploading the hex file, 256-byte chunks max.
    my normal code is uploading successful. but there is error following scnerio.

    1. using dcsm_security_tool hex file. when i dont enable Zone1 header, LFU is updated successfully, but when i enable Zone1 header (on Fresh Mcu) LFU fails. i have attaced both filre

    2. where i need to set 128-bit aligned addresses.

    hex.files.rar

  • the following is the dcsm.cmd file which gives error

    /* this linker command file is to be included if user wants to use the DCSM feature on the device
     * DCSM  means Dual Zone Code Security Module.
     * This linker command file works as an addendum ot the already existing Flash/RAM linker command file
     * that the project has.
     * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file
     * NOTE - please note fill=0xFFFF, this helps if users include this file in the project by mistake and
     * doesn't provide the needed proper *_ZoneSelectBlock.asm sources .
     * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this.
     *
     * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed.
     *
    */
    
    MEMORY
    {
    PAGE 0 :  /* Program Memory */
    
       /* Z1 OTP.  LinkPointers */
       DCSM_OTP_Z1_LINKPOINTER   : origin = 0x78000, length = 0x00000C
       /* Z1 OTP.  GPREG1/GPREG2 */
       DCSM_OTP_Z1_GPREG         : origin = 0x7800C, length = 0x000004
       /* 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/JTAGLOCK */
       DCSM_OTP_Z1_JTAGLOCK	    : origin = 0x78018, length = 0x000004
       /* Z1 OTP.  RESERVED/BOOTCTRL */
       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
    
       /* 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.  RESERVED/JTAGLOCK */
       DCSM_OTP_Z2_JTAGLOCK	    : origin = 0x78218, length = 0x000004
       /* Z2 OTP.  GPREG3/BOOTCTRL */
       DCSM_OTP_Z2_BOOTCTRL	    : origin = 0x7821C, length = 0x000004
    
       /* DCSM Z2 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
       dcsm_otp_z1_pswdlock		: > DCSM_OTP_Z1_PSWDLOCK		PAGE = 0
       dcsm_otp_z1_crclock		: > DCSM_OTP_Z1_CRCLOCK			PAGE = 0
        dcsm_otp_z1_jtaglock    : > DCSM_OTP_Z1_JTAGLOCK        PAGE = 0, type = DSECT
       dcsm_otp_z1_bootctrl		: > DCSM_OTP_Z1_BOOTCTRL		PAGE = 0, type = DSECT
       dcsm_zsel_z1				: > DCSM_ZSEL_Z1_P0				PAGE = 0
    
       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_jtaglock    : > DCSM_OTP_Z2_JTAGLOCK        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
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    


    and which dont give error is
    /* this linker command file is to be included if user wants to use the DCSM feature on the device
     * DCSM  means Dual Zone Code Security Module.
     * This linker command file works as an addendum ot the already existing Flash/RAM linker command file
     * that the project has.
     * The sections in the *_ZoneSelectBlock.asm source file is linked as per the commands given in the file
     * NOTE - please note fill=0xFFFF, this helps if users include this file in the project by mistake and
     * doesn't provide the needed proper *_ZoneSelectBlock.asm sources .
     * Please refer to the Blinky DCSM example in the controlsuite examples for proper usage of this.
     *
     * Once users are confident that they want to program the passwords in OTP, the DSECT section type can be removed.
     *
    */
    
    MEMORY
    {
    PAGE 0 :  /* Program Memory */
    
       /* Z1 OTP.  LinkPointers */
       DCSM_OTP_Z1_LINKPOINTER   : origin = 0x78000, length = 0x00000C
       /* Z1 OTP.  GPREG1/GPREG2 */
       DCSM_OTP_Z1_GPREG         : origin = 0x7800C, length = 0x000004
       /* 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/JTAGLOCK */
       DCSM_OTP_Z1_JTAGLOCK	    : origin = 0x78018, length = 0x000004
       /* Z1 OTP.  RESERVED/BOOTCTRL */
       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 = 0x78030, 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.  RESERVED/JTAGLOCK */
       DCSM_OTP_Z2_JTAGLOCK	    : origin = 0x78218, length = 0x000004
       /* Z2 OTP.  GPREG3/BOOTCTRL */
       DCSM_OTP_Z2_BOOTCTRL	    : origin = 0x7821C, length = 0x000004
    
       /* DCSM Z2 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
       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_jtaglock    : > DCSM_OTP_Z1_JTAGLOCK        PAGE = 0, type = DSECT
       dcsm_otp_z1_bootctrl		: > DCSM_OTP_Z1_BOOTCTRL		PAGE = 0, type = DSECT
       dcsm_zsel_z1				: > DCSM_ZSEL_Z1_P0				PAGE = 0
    
       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_jtaglock    : > DCSM_OTP_Z2_JTAGLOCK        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
    }
    
    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */
    

    i enabled DCSM module in my code (which was successfully flashing via LFU), failed this time, i enabled pswdlock permanently and disabled CRClock. 
    0x78010 turned FFF0. OTA faild and surprisingly reaming code is working only DCSM portion lfu failed

  • Hello,

    Apologies I was travelling for business and didn't have time to assist E2E. I will look at this thread tomorrow.

    Best,

    Matt

  • Hello,

    When programming flash memory, the start address must be at least 64-bit aligned. You are seeing an error because some of the DCSM sections generated by the tool start at unaligned addresses. To fix this, after generating the .txt hex file, you can merge all adjacent unaligned sections so that they are sent as one aligned section using the attached Python script. This script will be included as a part of the next C2000Ware release.

    Best,

    Alex

    merge_misaligned_blocks.zip