CSM (Code Security Mode) problem

Hello,

I'm trying to protect my program using the CSM feature from TMS320F28035 MCU.

After program the flash memory using the on chip flash programmer I change the code security password and program the password.

Finally I lock the code security password.

Up to this point, all is ok but the problem is that my program isn't working and I can't reconnect with the target.

When I try to connect I get this error:

=======================================================

Error connecting to the target:
Error 0x80002280/-1250
Fatal Error during: Target Communication, OCS, Control,
Device driver: Lost USB connection to emulator.
You should ABORT and restart to re-establish the USB link.


I/O Port = 510

Board Name: F28035
Cpu Name: TMS320F2800_0

=======================================================

Could someone tell me why I can't connect with the MCU again?

Marcio Carvalho (SYSC).

  • In reply to Lori Heustess:

    Hi Lori,

    I was working exactly at this point before you wrote this reply.

    Anyway, now I took out all my doubts.

    I changed my .cmd file for this:

    ===========================================================================

    MEMORY
    {
    PAGE 0 :
       /* BEGIN is used for the "boot to SARAM" bootloader mode   */

    /*   BEGIN       : origin = 0x000000, length = 0x000002*/

       FLASHAtoH   : origin = 0x3E8000, length = 0x00FF80     /* on-chip FLASA to FLASH */

       CSM_RSVD    : origin = 0x3F7F80, length = 0x000076     /* Part of FLASHA.  Program with all 0x0000 when CSM is in use. */
       BEGIN       : origin = 0x3F7FF6, length = 0x000002     /* Part of FLASHA.  Used for "boot to Flash" bootloader mode. */
       CSM_PWL_PROG: origin = 0x3F7FF8, length = 0x000008     /* Part of FLASHA.  CSM password locations in FLASHA */

       RESET       : origin = 0x3FFFC0, length = 0x000002
       IQTABLES    : origin = 0x3FE000, length = 0x000B50     /* IQ Math Tables in Boot ROM */
       IQTABLES2   : origin = 0x3FEB50, length = 0x00008C     /* IQ Math Tables in Boot ROM */
       IQTABLES3   : origin = 0x3FEBDC, length = 0x0000AA     /* IQ Math Tables in Boot ROM */

       BOOTROM     : origin = 0x3FF27C, length = 0x000D44
       RAMM1       : origin = 0x000400, length = 0x000400     /* on-chip RAM block M1*/

       RAML0toL3   : origin = 0x008000, length = 0x0020C0     /* on-chip RAM block LO,L1,L2,L3 */

    PAGE 1 :

       BOOT_RSVD   : origin = 0x000002, length = 0x00004E     /* Part of M0, BOOT rom will use this for stack */
       RAMM0       : origin = 0x000050, length = 0x0003B0      /* on-chip RAM block M0*/

    }


    SECTIONS
    {
       /* Setup for "boot to SARAM" mode:
          The codestart section (found in DSP28_CodeStartBranch.asm)
          re-directs execution to the start of user code.  */
       codestart        : > BEGIN,     PAGE = 0
       ramfuncs         : LOAD = FLASHAtoH,
                          RUN = RAML0toL3,
                          LOAD_START(_RamfuncsLoadStart),
                          LOAD_END(_RamfuncsLoadEnd),
                          RUN_START(_RamfuncsRunStart),
                          PAGE = 0

       .text            : > FLASHAtoH, PAGE = 0
       .cinit           : > FLASHAtoH, PAGE = 0
       .pinit           : > FLASHAtoH, PAGE = 0

       csmpasswds       : > CSM_PWL_PROG PAGE = 0
       csm_rsvd         : > CSM_RSVD     PAGE = 0

       /* Initalized sections go in Flash */
       /* For SDFlash to program these, they must be allocated to page 0 */
       .switch          : > FLASHAtoH, PAGE = 0
       .econst          : > FLASHAtoH, PAGE = 0

       /* .reset is a standard section used by the compiler.  It contains the */
       /* the address of the start of _c_int00 for C Code.   /*
       /* When using the boot ROM this section and the CPU vector */
       /* table is not needed.  Thus the default type is set here to  */
       /* DSECT  */
       .reset           : > RESET,     PAGE = 0, TYPE = DSECT /* not used, */

       /* Allocate uninitalized data sections: */
       .stack           : > RAMM0,     PAGE = 1
       .ebss            : > RAML0toL3, PAGE = 0
       .esysmem         : > RAML0toL3, PAGE = 0

       IQmath           : > FLASHAtoH, PAGE = 0
       IQmathTables     : > IQTABLES,  PAGE = 0, TYPE = NOLOAD
    ===========================================================================

    Up to now, all is working great!

    Thanks for your attention.

    Marcio Carvalho (SYSC).

  • In reply to Marcio:

    Excellent!

    Did a reply answer your question? If yes, please click the "yes" button located at the bottom of that post.
    Visit these helpful C2000 Links!
    C2000 TI Wiki Pages
    TI Forum Sitemap
    ControlSUITE
    C2000 Getting Started
    CLA FAQs
    Workshop Material!