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.

TMS320F28035: Entire internal flash locked while writing with Flash API

Part Number: TMS320F28035

Hello TI family,

I am a little bit puzzled by the current issue we are facing:

We are using the Flash API to reprogram the internal flash. It may be the case that I halted the DSP during erase process.

Now, whenever I try to program the DSP it fails to erase. We are using Code Composer Studio 6.1.3.00033 with XDS100v2. The setup and project works with another control card.

Some things we have observed and tried:

  • The DSP is certainly not locked with CSM password. When trying to program the internal flash, there are 2 or 3 attempts to erase before dropping and issuing an 'unknown error'.
  • No internal flash sector can be erased (from A to H). This one is very strange that all sectors fail to erase. Should be one at a time. This was attempted with the On-chip Flash tool.
  • Depletion recovery tools is unsuccessful. Have run it probably 30 times...

 If it is permanently damaged/locked is fine, we can replace it but we do not understand how this happened so we do not have a way to prevent this from happening again…

Any idea on how the entire internal flash got locked?

Thanks for the support,

Matias

  • Hi Matias,

    If you have interrupted the flash operation in between then I am afraid that DSP may have been locked.
    To confirm the same, you can try to connect to device via CCS (manually launch the target configuration file and then connect) and check the flash content in different sectors in CCS memory watch window. If all the contents are shown as 0x0 then DSP is locked. You could also check the bit '0' of CSMSCR register and if it is set to '1' then DSP is secure( LOCK).

    DSP could get LOCK if CSM locations get cleared to 0x0 and when that happens all flash sectors get LOCK and no flash operation can be performed.

    Regards,
    Vivek Singh
  • Hi Vivek,

    I can connect and step-into (F5). I can see that the Security password is 0xFFFF starting at 0x3F7FF8. CSM register has 0x70, so it is 'not locked'. KEYs 0 to 7 are shown as 0xFFFF as well. Looking good...

    Now... if I hit Resume (F8) and Suspend (Alt + F8) then all this changes and I see 0x0000 in the KEYs... not good. CSM register still has a 0x70. Not sure why this happens only after I hit Resume.

    Looks like locked right? The debugger tries to erase and fails instead of showing me a defined error. This is what was making me think there is something else other than the security code.

    Thanks again,

    Matias
  • Hi Matias,

    If security password values are ALL_1 (0xFFFF for all the 16 word password) then device is never locked. Value in KEYx registers are ignored so even though values are 0x0, device remains non-secure. That is why you see value 0x70 in CSMSCR register (bit 0 is '0').

    I'll ask our flash expert to look into this further.

    Regards,
    Vivek Singh
  • Matias,

    Can you send the following infomation?

    - Snapshot of 0x3F7FF8 - 0x3F7FFF and CSMCR register once you connect
    - Snapshot of 0x3F7FF8 - 0x3F7FFF and CSMCR register once you hit resume (F8)
    - Send the snapshot of CCS error message received when running the flash erase operation

    Regards,
    Manoj
  • Hello Manoj,

    I am attaching the screenshots requested. Please see below:

    (Sorry for the white spaces)

     

  • Mathias,

    Address locations in bootrom you mentioned 0x3FFEB3 and 0x3FFEB4 actually belong to Flash API delay function called Flash28_Delay. It looks like device got suspended in middle of executing flash api function. So, you don't need worry about seeing 0x0000s in flash during this time.

    Based on the snapshots it is clear that device is in unlocked state and your individual flash sector is in depletion.

    Regarding the CCS error message, try just erasing one flash sector at a time by disabling other sectors. Mostly likely you should be able to erase / program other sectors.

    Regards,
    Manoj
  • Hi Manoj,

    I did try erasing flash sectors individually. None of them can be successfully erased. Same error is shown for each case. This is the strange part since the device is not locked.

    Is there any way to configure the time for the Depletion Recovery tool. I wouldn't mind leaving the process running for as long as it takes...

    Thanks,

    Matias

    Attaching this image as proof:

  • Matias,

    No, there is no way to configure time of depletion recovery tool. Your only option is to replace the part.

    Please make sure not to halt the flash program / erase operation to avoid such situations.

    processors.wiki.ti.com/.../FAQs

    Regards,
    Manoj