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.

Questions about flash depletion and power loss during flash operations

Part Number: TMS320F28027

I've bricked several devices due to power loss during a firmware update.  I understand that this is due to flash depletion, and that the csm passwords get corrupted.  However, Im setting the password to 0xFFFFFFFFFFFFFFFF, which I assume leaves the code security module disabled.  In this circumstance, should losing power during a flash erase cause such bricking?  Alternatively, if what Im doing now isn't satisfactory to disable CSM, what are the necessary steps to disable CSM, such that losing power during an erase does not cause this bricking?

Secondly, the way depletion is described, it sounds like something that happens over time, as opposed to a singular event going from perfectly working flash to not working at all flash.  This idea is supported by the existence of functions to repair depleted sectors.  However, when this problem happens for me, it always bricks on the very first instance of power loss during flash erase.

  • Power loss during flash operation will brick the part irrespective of what value you are programming for CSM password. You need to make sure you have stable power supply during flash programming operation.

    Our flash expert will provide further detail on  flash depletion.

    Regards,

    Vivek Singh

  • Todd,

    Value of the password provided (or any flash location) in the image does not matter in the case of erase.  If power is lost once the flash is cleared (to 0s) during the erase process, the device gets permanently locked - All 0s password causes permanent lock.  One way to decrease this occurrence (if possible) would be to not erase the sector that has passwords in it. 

    Another cause for bricking the devices is due to depletion as you said.  Please see this FAQ post for more info on it: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/757586?-FAQ-F05-Flash-What-is-depletion- 

    When it comes to depletion, you have to avoid erase on the sector that has passwords and also it's balancing sector. This suggestion above is just to avoid corrupting the password locations.  Note that other sectors can enter in to depletion when erase is disturbed for those sectors.  

    Thanks and regards,

    Vamsi

  • Vamsi,

    If I understand correctly, my bricking is likely due to the CSM passwords being written as 0 after an interrupted erase.

    I have already moved the bootloader to sector A, so it seems like the only concern I should have related to damaging the flash is depletion.  Are there any specs around this depletion, even if just typical values?  Everything I've read about depletion so far sounds very loosely defined.  It might happen under certain circumstances.  If it happens enough times, the flash may not be eraseable.  The recovery mechanisms could possibly resolve this depletion.

    How many power losses during erases can a typical device withstand before it can no longer function properly?

    What does a firmware based depletion recovery solution look like?  What indication will the processor have that depletion recovery should be attempted?

  • Todd,

    Depletion does not happen over time and is a singular event.  If power can not be ensured during erase as per the datasheet spec, do not modify the password sector and its balancing sector.

    Please note that the latest devices like F2837xD, F2837xS, F2807x, F28004x, F28002x, F2838x etc. do not have this depletion issue (these devices use a different flash technology).  Also, passwords are not in flash sectors for these devices and instead they are located in OTP.  Take a look at these devices.

    Thanks and regards,
    Vamsi