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.

C28xx: File Loader: Memory write failed: Unknown error

Part Number: TMS320F28069
Other Parts Discussed in Thread: UNIFLASH

I have tried to reprogram my tms320f28069m on launchpad board and keep getting the following error:

C28xx: Flash Programmer: Device is locked or not connected. Operation cancelled.
C28xx: File Loader: Memory write failed: Unknown error.

I am using CCS 10.4.0.00006.

I am using XDS100v2 to program/debug.

The microcontroller was working and reprogrammable until now, however I still can access the memory browser and I have found that one of the CMS_KEY registers is broken:

CMS_KEY0 become all zeros and unmodifiable for some reason, hence I can't write to memory. Other key registers are still writable and readable. I read on other threads that a microcontroller can be locked due to voltage drops, but I am not sure that this is the case.

  1. Is there a way to fix that or the microcontroller has been permanently locked?
  2. Can I somehow prevent this situation?
  • Hi,

    CSM_KEY register are memory map registers and locking device should have no impact on these registers. User should always be able to update these so this is strange issue. Are you trying to update these register values from CCS register view or memory view ? After CCS connection, did you try to issue reset from CCS and then see what is the value in CSM_KEY0 register ?

    Regards,

    Vivek Singh

  • I have tried to update these registers from memory view and from register view, neither of these worked. CPU reset from CCS menu gives this error message:

    C28xx: GEL Output:

    Device Calibration not complete, check if device is unlocked and recalibrate.

    But immediately after connecting in debug menu all CSM_KEY values are 0xFFFF, but CSM_KEY0 value changes to 0 after refreshing the view. I was also trying to unlock device from UniFlash, it hasn’t worked too.

  • Thanks. This is very strange. We'll have other expert look into this issue.

  • OK, you are able to connect to the device but not program the flash. 

    1. Are you able to look at the flash contents?
    2. Did you use passwords earlier (when you were able to successfully program the device)?
    3. Does it make any difference if you change the boot-mode to, say, SCI?
    4. Are you able to load code into unsecure RAM (L8, for example) and run it? For example, you could try running a simple GPIO toggling test.
    5. Are you able to write (and read back) any value to registers KEY2 to KEY7? 

    The fact that KEY0 register alone appears to work incorrectly suggests that device might have gotten damaged.

  • Ilnyz,

    As Vivek mentioned, AE0 - 0xAE7 shouldn't be affected whether CSM is locked (or) not and you should be able to change them anytime. It is likely that device is damaged.

    Also, did you by any chance update gel file(specially Unlock_CSM() function) for the device?

    Regards,

    Manoj

    1. No, I cannot look at the flash or ram contents, all I can see is zeros.
    2. No, I do not use any passwords.
    3. No difference in SCI mode.
    4. Hooray, I can run programs from RAML8, but flash and secured ram is locked still.
    5. Yes, KEY2-KEY7 registers are working fine.
    6. No, I didn't change GEL files.
  • Ilnyr,

              Based on what you said, it appears the device got locked inadvertently. Considering KEY0 alone is malfunctioning, it is likely the device suffered some form of damage.