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.

F280049C Flash erase and program with security

Genius 5910 points

My correct bootloader application can't erase flash under password protection. All of the flash is in zone1 and also the bootloader. I use the embedded flash library but when the device is locked I can't erase flash.  Any suggestion what this problem is?

Update 2/10/2020: The problem with programming flash seems not related with password protection. It works fine in the debug environment but not in stand-alone mode.

  • Hi,

    1) When you say embedded Flash API library, do you mean the Flash API library in ROM?  If yes, please note that the Flash API library in ROM is not secured. Hence, if you want to erase/program the Flash sectors that are secured, you need to embed the Flash API library in to your application and execute it from the same security zone as that of the Flash sector on which the current erase or program operation is targeted.

    2) Apart from that, please check whether or not you configured the FLSEM register correctly for the zone that you want.  Please see the register description section 3.14.10.1 FLSEM Register in TRM at http://www.ti.com/lit/ug/sprui33b/sprui33b.pdf.  

    FLSEM must be configured for the zone from which you want to execute the Flash API (since Flash API writes to Flash registers).

    3) You said it works in debug environment, but not in stand-alone: Did you check whether the device is secured or not in the debug-mode to make sure you are comparing the same context with that of standalone?  Also, when you are in debug mode, after loading the application in to Flash, do a debug reset and restart the application execution and see whether it still works or not. This is to make sure that application starts from a known device state.

    I will loop our security expert in to this discussion based on your findings.

    Thanks and regards,

    Vamsi

  • 1) I used the ROM. I changed it to the RAM function. 

    2) Ok I added this.

    Success! This solved the problem. It should be nice if this is added in the flash API documentation.

    3)  I don't know for sure what the problem is. I have to many variables. I have to reduce this first.

  • Hi,

    Glad it helped.

    2) It is mentioned in Flash API documentation. See section 2.3.3 Key Facts For Flash API Usage.

    3) You can ignore this since the issue is closed.

    I am closing this post.  You can open new posts if you have other questions.

    Thanks and regards,
    Vamsi