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.

LAUNCHXL-F280025C: Warning: Failed unlocking device (zone 1) after reset.

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: UNIFLASH

Hi,

I have FLASH issues after modified codes based on flashapi_ex1_programming example, now even reinstall the original flashapi_ex1_programming, I still encountered error messages : 

Warning: Failed unlocking device (zone 1) after reset.  

I did touch or set any password, can you please tell me how to unlock it ? and how to prevent it from lock again ? 

I tried UNIFLASH to erase with same error returned.

thanks,

Patrick

  • Patrick,

    Maybe you programmed DCSM OTP by mistake.

    Can you check the password locations in the memory window and see if it is visible?  If they are visible, you can copy it to Uniflash GUI to unlock the device.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Can you check the password locations in the memory window and see if it is visible?  If they are visible, you can copy it to Uniflash GUI to unlock the device.

    where's the memory windows  ? 

    Thanks

    Patrick

  • Patrick,

    CCS debug view menu -> View -> Memory browser.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    The problem is I couldn't get DEBUG windows because compile failed.

    see my last attachment, my Memory Browser windows is empty !

    Thanks,

    Patrick  

  • Patrick,

    That error is not a compilation failure error.  That error is related to unlocking the device.

    Once the debugger connection is established to the device, open the CCS memory window for the password locations and check for the values in those locations.  If you are able to read those locations, you can use those values to unlock the device.  

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Thanks for your follow up, however as I said before without compiled, my MEMORY BROWSER (memory window that you mentioned) windows is empty, before my FLASH was locked I can check memory contains there, READ and WRITE variables in exact location.

    C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
    C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
    C28xx_CPU1: Warning: Failed unlocking device (zone 1) after reset.
    C28xx_CPU1: Warning: Failed unlocking device (zone 2) after reset.
    C28xx_CPU1: Flash Programmer: Error erasing Sector 0. FMSTAT (STATCMD on some devices) value = 1040. Operation Cancelled (0).
    C28xx_CPU1: File Loader: Memory write failed: Unknown error
    C28xx_CPU1: GEL: File: /Users/dannychan/workspace_v11/universal_motorcontrol_lab_f28002x/Flash_lib_DRV8323RH/universal_motorcontrol_lab_f28002x.out: Load failed.

    But UNIFLASH can show Memory contain, does it help ? 

    Thanks,

    Patrick

  • Hi Patrick,

    I will review and get back to you this week.

    Thanks and regards,
    Vamsi

  • Patrick,

    In the memory window snapshot that you provided, the address is shown as 0x00000000.

    As you know, you need to enter the desired address to view the content at that address - please enter the address of the password locations and see what values you see there.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    yes this is UNIFLASH interface, as I said I can browser MEMORY from UNIFLASH not CCS debug view menu -> View -> Memory browser (you mentioned)

    OK, if you agree UNIFLASH can solve my problem, please let me know what's next ? 

    Thanks,

    Patrick 

  • Patrick,

    It does not matter which tool you use, if you are able to see the password values in the memory window, you can copy them to the GUI's password fields and click on unlock.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    f you are able to see the password values in the memory window, you can copy them to the GUI's password fields and click on unlock.

    I don't know where about ? can you tell me how ? 

    Thanks,

    Patrick

  • Patrick,

    Did you read the DCSM chapter in the TRM?  If not, I would suggest you to read it.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Did you read the DCSM chapter in the TRM?  If not, I would suggest you to read it.

    yes please, what's TRM ? 

    Thanks,

    Patrick

  • Patrick,

    Technical Reference Manual available here: https://www.ti.com/product/TMS320F280025C

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    f you are able to see the password values in the memory window, you can copy them to the GUI's password fields and click on unlock.

    Can you tell me where's the memory address of Password values stored ? 

    Thanks,

    Patrick

  • Hi Vamsi,

    I tried to load the value from MEMORY location e.g. PSWDLOCK, Zone_Select_Blockx 

    Look liked I couldn't load any value with UNIFLASH too, right ? 

    Thanks,

    Patrick

  • Patrick,

    You might have programmed PSWDLOCK field as well at 0x78010.  If that is programmed, you won't be able to read the passwords.  

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    I pressed the Program OTPSECLOCK button, I still have Failed unlocking device (zone 1) ... error, can you let me know why  ?

    Thanks,

    Patrick

  • Patrick,

    I am assigning this thread to our security expert to help you further.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Thank you for your excellent supports  Slight smile

    Thanks,

    Patrick

  • Hi,

    Look like the password is programmed so you need to use the password to unlock the device.

    Regards,

    Vivek Singh

  • Hi Vivek,

    Look like the password is programmed so you need to use the password to unlock the device.

    how can you tell password is programmed ? 

    I didn't use any password on my board, after modified some codes of the example "flashapi_ex1_programming" I got the following error.

    C28xx_CPU1: Warning: Failed unlocking device (zone 1) after reset.
    C28xx_CPU1: Warning: Failed unlocking device (zone 2) after reset.

    so you need to use the password to unlock the device.

    I don't know the password since I didn't enter to it Disappointed

    Thanks,

    Patrick

  • Hi Vivek / Vamsi,

    Any update ? 

    Thanks,

    Patrick

  • Patrick,

    You might have programmed the password and the PSWDLOCK by mistake.

    Unless you know the password, you won't be able to unlock this device.

    Maybe you can check the map file (and/or the hex file generated from the executable out file) and see if anything is mapped to the DCSM OTP password locations by mistake in your application.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    Maybe you can check the map file (and/or the hex file generated from the executable out file) and see if anything is mapped to the DCSM OTP password locations by mistake in your application.

    I have attached my MAP file can you help to check if it's overlap with password location  ?

    Also I don't have ELF / HEX file generated because of errors  

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    ******************************************************************************
    TMS320C2000 Linker Unix v21.6.0
    ******************************************************************************
    >> Linked Mon Sep 5 15:04:05 2022
    OUTPUT FILE NAME: <flashapi_ex1_programming.out>
    ENTRY POINT SYMBOL: "code_start" address: 00080000
    MEMORY CONFIGURATION
    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    BOOT_RSVD 00000002 00000126 00000000 00000126 RWIX
    RAMM0 00000128 000002d8 00000000 000002d8 RWIX
    RAMM1 00000400 000003f8 00000380 00000078 RWIX
    RAMLS4567 0000a000 00002000 00000139 00001ec7 RWIX
    RAMGS0 0000c000 000007f8 00000000 000007f8 RWIX
    BEGIN 00080000 00000002 00000002 00000000 RWIX
    FLASH_BANK0_SEC0 00080002 00000ffe 00000000 00000ffe RWIX
    FLASH_BANK0_SEC1 00081000 00001000 00000279 00000d87 RWIX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    You might have programmed the password and the PSWDLOCK by mistake.

    I just modify the TI example flashapi_ex1_programming and added data read write to 0x86100U, and this is within section 6, nowhere else.

    #define DataArea_start 0x86000U
    #define OptionArea_start 0x86100U

    #define W_DATA_IN_FLASH_BUFFER 0x100
    #define W_OPTION_IN_FLASH_BUFFER 0x100

    uint16_t DataBuffer[W_DATA_IN_FLASH_BUFFER];
    uint16_t OptionBuffer[W_OPTION_IN_FLASH_BUFFER];

    for(i=0, u32Data_Index = DataArea_start; (u32Data_Index < (DataArea_start + W_DATA_IN_FLASH_BUFFER)); i+= 8, u32Data_Index+= 8)
    {
       oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Data_Index, DataBuffer+i, 8, 0, 0,                       Fapi_AutoEccGeneration);

       while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);

       if(oReturnCheck != Fapi_Status_Success)
       {
          Example_Error(oReturnCheck);
       }
    }

    .
    .
    .


    for(j=0, u32Option_Index = OptionArea_start; (u32Option_Index < (OptionArea_start + W_OPTION_IN_FLASH_BUFFER)); j+=8, u32Option_Index+= 8)
    {
       oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Option_Index, OptionBuffer+j, 8, 0, 0,                   Fapi_AutoEccGeneration);

       while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);

       if(oReturnCheck != Fapi_Status_Success)
       {
          Example_Error(oReturnCheck);
       }
    }

    Vamsi, please help, at lease to point out what's going on both my code or setting caused this so that it won't happened again !!!!!!

    Thanks,

    Patrick 

  • Patrick,

    I don't see any thing mapped to the DCSM OTP in your map file.

    Maybe you might have entered some values for the password and PSWDLOCK locations in the GUI by mistake?  Please check.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    Maybe you might have entered some values for the password and PSWDLOCK locations in the GUI by mistake?  Please check.

    I don't think so, I am still in the learning path of TI MCU, learning how to READ WRITE variables to / from FLASH, therefore modify based on example "flashapi_ex1_programming", at first everything was fine, until I added #define OptionArea_start 0x86100U to see if I can share both DataArea_start (0x86000U) and OptionArea_start (0x86100U) within sector 6 ... then did debug got below error messages : 

    C28xx_CPU1: Warning: Failed unlocking device (zone 1) after reset.
    C28xx_CPU1: Warning: Failed unlocking device (zone 2) after reset.

    Then download and install UNIFLASH to see what's inside FLASH area ... 

    Thanks,

    Patrick

  • Hi Patrick,

    There is no any other way to lock this device except by programming the password.  

    If you don't know the password, there is no way to unlock this.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    If I order new board, how to prevent it from accidentally locked (I think you still believe my board was locked by mistake), such as programme my own password first ?

    If you have time can you take a look of my codes because I am afraid if I run this code I will lock my board again.

    Thanks,

    Patrick

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //#############################################################################
    //
    // FILE: flashapi_ex1_programming.c
    //
    // TITLE: Flash programming example
    //
    //! \addtogroup driver_example_list
    //! <h1> Flash Programming with AutoECC, DataAndECC, DataOnly and EccOnly </h1>
    //!
    //! This example demonstrates how to program Flash using API's following options
    //! 1. AutoEcc generation
    //! 2. DataOnly and EccOnly
    //! 3. DataAndECC
    //!
    //! \b External \b Connections \n
    //! - None.
    //!
    //! \b Watch \b Variables \n
    //! - None.
    //!
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Patrick,

    I looked at the code snippets that you sent me in previous days.  Reviewing the entire code takes time - I can take a look on September 23rd.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    I am going to order new board tomorrow, can you suggest any way to prevent my new board from being locked again such as programme my own password first before hand ?

    Also thanks for your prompt help for reviewing my codes.

    Thanks,

    Patrick

  • Hi Patrick,

    Another thing that you may want to try (although I don't think this is not the case with your previous device corruption):  Try powering the board from external supply instead of the laptop USB pot.

    Thanks and regards,
    Vamsi