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.

TMS320F280049: Unable to erase the flash in the secure zone

Part Number: TMS320F280049

Hi Team,

For DCSM,  the TRM that it say the user must either unlock the zone to which that particular sector belongs, using PMF or execute the Flash programming code from secure memory which belongs to the same zone.

My customer allocate all RAM and Flash to zone1 for secure as below showed, In their application code, The flash API code run in the RAM, in theory there is no need to unlock the device and can erase the flash when call flash API, but in fact it fail to do so, only that unlock the device with password that can erase the flash.

what is the reason for this and any suggestion?

  • Strong,

    Can you check whether customer configured the FLSEM register for Zone1 or not?

    If not, please suggest to configure it before using Flash API.  Please see 3.14.10.1 FLSEM Register in TRM.

    Thanks and regards,

    Vamsi

  • Vamsi,

    Customer have configured the FLSEM register for Zone1. actually they can erase flash when the device in unlock status.

  • Strong,

    Ok. What is the FMSTAT value after the erase operation when erase did not happen?  Fapi_getFsmStatus() can used to know the FMSTAT value. Please check and let me know.

    Thanks and regards,
    Vamsi

  • Vamsi,

    The erase operation only fail at locked status, in this status, is it able to look at the FMSTAT value by CCS?

  • Ho Zhang,

    Yes, you should be able to view the FLSEM even when zone is locked. Also Vamsi was asking to check if user is changing the FLSEM value in his code before performing the flash operation. So please ask them to check the code and confirm the same. If they are not changing the FLSEM to correct value then flash operation will not work on LOCKED device (or zone).

    Regards,

    Vivek Singh

    Edited to replace FMSTAT with FLSEM.

  • Strong,

    Flash registers will be locked as well.  Hence, you will not be able to read the FMSTAT from CCS.

    But the application can read it (as it is executing from same zone) and write it in an unsecured location for the debug purpose.  Or you can unlock and check the FMSTAT once the erase operation fails.

    Regarding FLSEM: I understand that the customer configured it for zone1.  Can you confirm that it is configured for zone1 before Flash operations even in the secured case?

    Thanks and regards,
    Vamsi