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.

Problem flashing a 2801

I'm trying to program a 2801 to flash using CCSv4 and an XDS510LC (Windows XP Pro, SP3) and I get the following error.  I can't get it to compile with the 2801_RAM_lnk.cmd but it compiles fine using 2801.cmd.  It just won't program.  The reason it doesn't compile with the 2801_RAM_lnk.cmd is because I have about 3K of program and only 2K of ram. 

 

The 2801 is on a target system using a 100MHz oscillator connected to XCLKIN.  I've disabled the PLL and set the CLKDIV for no division.

The same code programs fine on the 2808 (using the appropriate PLL/CLKDIV because the Docking Station runs off PLL) using the 2808_RAM_lnk.cmd but won't program using the 2808.cmd file.  Once I get the code loaded into debug I use the debut/tools/on chip flash function to tell it to program to flash and it programs thereafter to flash.

 

Thanks in advance,

 

Rick

 

 

C28xx: GEL: Warning loading file 'C:\Program Files\Texas Instruments\ccsv4\emulation\gel\F2801.gel', line 103: the function 'GEL_OpenWindow' is not supported.

C28xx: GEL: Warning loading file 'C:\Program Files\Texas Instruments\ccsv4\emulation\gel\F2801.gel', line 112: the function 'GEL_CloseWindow' is not supported.

C28xx: Flash Programmer: Device is locked or not connected. Operation cancelled.

C28xx: Trouble Writing Memory Block at 0x3f7bbc on Page 0 of Length 0x39

Cannot write to target

  • Rick,

    Unfortunately it sounds like your device may be locked. If a previous flash erase process was somehow inadvertantly interrupted, or the device gets some spurious / unintentional resets during flash programming, it could cause the password locations to go into an unknown state. Once a device is locked, unfortunately there is no way to recover it.
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/w/design_notes/csm-recovering-a-locked-device.aspx

    There are some troubleshooting tips you could try first though to see if you can recover. These related threads might help:
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/31377/138937.aspx#138937
    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/21241/82154.aspx#82154

    Also make sure you are using the latest version of CCS, preferably  v4.2.3. There were some flash programming issues in some very early releases of CCS4 (4.0.x) so just be sure to not be using those old versions.

    If none of the above suggestions help and your CSM is indeed locked, you may have to replace the chip on the board.

  • Thanks Aarti,

    I cut my program down to a minimal amount so I could program to RAM.  This also allowed me to get to debug mode to look at the memory.   I provided a screenshot that shows the flash memory at the end where the password stuff is kept.  This might be garbage due to the lock also.  I'm hoping TI can make sense of the flash data.

    The screenshot also shows the programming error when I tried to program to RAM.  Apparently it doesn't like 0x00000000 for a memory address (unless that's a remnant of a locked processor).

    I'm using CCS Version 4.1.0.02005 and automatic updates is on.  I don't know why CCS hasn't updated to the latest.

  • Hi All,

    Can someone answer the question above?  Is the processor locked, not locked, or you can't tell from the data?  "You don't know" is a perfectly acceptable answer and it's much better than no response.  I'm stalled here.  We only have 2 of these processors and I'd hate to take out one and throw it away if this isn't my problem.  I can't get more of these processors for quite some time.

    Thanks,

    Rick

  • Your password locations (starting at 0x3F7FF8) are showing values other than 0x0000(which indicates device is locked) and 0xFFFF (indicates unlocked). So it likely not permanently locked.

    In this case you can try writing the same values seen in the memory window into the KEY registers (0xAE0 - 0xAE7). Open the register view in CCS and expand CSM to see the KEY registers. If the KEY and LOCK registers match then the device will be unlocked. There is also a bit in the CSMSCR register that tells you if the device is secure or not (1=secure).

    I'll also move your post to the C2000 forum so the experts there can add additional comments.

  • Hi Aarti,

    I tried to unlock the device using the code I could see in the window.  It did not work.  The response was "unlock failed.  Device still locked".  I'm assuming that I'm locked and I don't know the code (the data I'm seeing is likely garbage because it's locked) so we're taking the processor out and replacing it.

    I'm stuck now because this is our last processor for at least 2 weeks.  Can someone tell me how to prevent CCS from locking the processor?  I can't even attempt another programming until I can ensure this can't happen again.  I'm currently stalled on my project.

    For the record, I'm using CCSv4.1.0.02005.  I have automatic updates turned on so I should be up to the latest version but obviously I'm not.  The latest is supposed to be 4.2.3xxx or something like that.

  • Hi,

    Can someone answer the question in my post just above this one?  I really need to know how to ensure that CCS won't lock another processor as we've only got one left.

    Thanks in advance,

    Rick