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.

CCS/UCD3138: How to set key to avoid DFLASH from erasing?

Part Number: UCD3138

Tool/software: Code Composer Studio

Hello,

I wanna know the reason why DFLASH would be erased.And could you elaborate the method of setting key to avoid this?

  • You may find the description of the INTERLOCK_KEY in DLASHILOCK, in the UCD3138 manual.
    This register bit-field value need to be set to 0x42DC157E in UCD3138 in order to unlock flash erase or read.
    In some firmware implementations the same PMBus command that initiates Flash erase/write also sets this value to the key in order to enable the erase/write and may also leave the key value intact after the write.
    The above firmware treatment of Flash erase/write is not robust enough to prevent undesirable erase/write in noisy environment.
    Noise or other interference/error can initiate a Flash erase/write when the previously set key value is in the INTERLOCK_KEY.
    The best practice to prevent this is to have two separate PMBus commands.
    One that only sets the INTERLOCK_KEY and a separate command that writes to flash.
    The chance that both commands will get executed by mistake and in the right order is extremely low.
    Also at the end of the implementation of the second PMBus command (after writing to flash), you should clear the INTERLOCK_KEY, in order to prevent accidental erase/writes.

    Hope this makes sense.
  • Hi Larry, if the above addresses your question please set the status of this post to resolved.