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.

TM4C123GH6PM: sector is locked

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: LMFLASHPROGRAMMER, UNIFLASH
device TM4C123GH6PM  sector is locked   .
how can i unlock this device??
  • Hi Green,
    What tool are you using to erase the flash? Did you somehow commit the permanent protection of the sector from erase using the FMPPE register?

    Please follow section 5.3 of this app note to unlock the device. 

  • Would have been "nice" (and considerate) had poster described, "any/all actions performed" - which may have led to his predicament.

    Minus the fair presentation of, "What & How" (actions/history) - poster runs the risk of "falling from that same high cliff - repeatedly!"
  • Hello Charles,

    I came across to this post as we using TM4C123GH6PM MCU on a board design and it got locked.

    I checked the pdf you had shared, the LMFlashProgrammer utility only supports the Stellaris ICDI, so it not applicable for my case.

    Is there any other method for me to reset the MCU itself?

  • Hi Jiunjye,
    What emulator do you have on your board? If you have use XDS100 or XDS200 then you could use Uniflash to unlock the device. Please see section 5.3.2 in the app note for detail. Or you could follow the instructions in your respective datasheet under the section 4.3.4.3 Recovering a "Locked" Micrcontroller.
  • Hello Charles,

    I will have a look on the emulator tomorrow morning.

    However, in the same time, I have found a statement with code:
    A write of the value 0x4C4F.434B unlocks the GPIO Commit (GPIOCR)register for write access

    Would this code help to unlock the MCU?
  • Hi Jiunjye,
    No, writing 0x4c4F.434B to the GPIOLOCK register is to unlock the GPIOCR register. This is different to unlocking the device. Unlocking the device will bring the device to its factory setting.
  • Greetings Charles,

    This poster's, "Sector is Locked" issue is relatively rare here - is it not?

    While I agree that the, "Return of his device" to "factory original" will clear the sector lockage - no evidence has arrived which identifies the likely "cause" of such "lockage" - thus the poster may (almost) immediately - descend into the same "trap."       (this concern was voiced earlier - is there "no" interest in preventing a recurrence?)        

    Even if "rejected" by this poster - would not, "Efforts in Prevention - and/or Correction" (beyond the "brutal") prove of interest & value to "many!" Appears that a genuine, "Teaching Moment" has arrived - which has a reach (and benefit) far beyond any single thread - especially one in which key facts are "not" much in evidence...

    • Was the "sector lock" desired?    
    • What was the calling mechanism?      
    • If not - how can such an unwanted "sector lock" be prevented?
    • And - does the "sector lock" prevent its (program controlled) deliberate "disabling?"

    Is it not true that such "added detail" vastly enriches this thread - while preventing this poster from (again) suffering under this issue?

  • Hi cb1,
    I think the original poster Green has yet to comment how the sector was locked, i.e. if FMPPE was somehow touched by chance. The second poster Jiunjye followed up the post as he has similar issue. I'm interested to find out how they were locked in the first place. I can't think of why a sector would be locked by itself unless it was the intent of the software to do so or by accident.
  • Charles Tsai said:
    I'm interested to find out how they were locked in the first place. I can't think of why a sector would be locked by itself unless it was the intent of the software to do so or by accident.

    Charles - those 2 sentences describe precisely the key issues here - which may protect (many) others - from such misfortune.

    Somehow - I found those issues "not" sufficiently raised/addressed  - leading to my writing...       Thanks for responding - of course poster response (they are the ones "suffering" - whom we are attempting to aid) would prove most useful...

  • There is one other possibility for the original poster at least. I have seen a tool not being able to erase sector 0 individually but still be able to bulk erase.

    Robert
  • FYI, we are able to unlock the MCU by written BD D0 ED 93 D7 C9 B9 B8 F7 4E 7E 99 6C F7 FC 3C to address 0x1FFF0-0x1FFFF and power cycle it.

    Not sure will this helps on others locked issue, but it has resolved our problem.

  • Thank you for that info.

    It would be useful to describe "How" you passed that data when the MCU appeared "Locked" - thus unresponsive...
  • MCU only locked for programmed sector, if there is nothing at the written address, you still can be able to write something to it..

    Even if the address is locked for example, 0x520 has content, but you are still allow to write 0x4c4F.434B to that particular address and unlock that sector freely.
  • Well stated - thank you - may we ask if you (or your firm) had "intended" to lock that (or any) MCU sector?

    There is concern that (somehow) an inadvertent (unwanted) "sector lock" (may) have occurred.