Posts Tagged ‘reverse locked ic program’

PostHeaderIcon A Locked PIC16F54 Can Be Erased: That Is the Whole Problem

There is a sentence that ends a surprising number of enquiries, and it is this: the protection can be removed, as long as nobody wants what it was protecting. On a flash part the bit that blocks a read sits in the same kind of cell as the code and is cleared by the same bulk erase that clears the code. Asking for one without the other is asking the silicon to do something it has no mechanism for.

Reverse Locked IC PIC16F54 manufacturing process and extract IC PIC16F54 Firmware from secured program and data memory by cracking PIC16F54 eeprom and flash memory

Two different kinds of not working

A part that will not give up its code is not the same as a part that will not run. The first is a protection state; the second is a fault. Customers arrive with the second and describe it as the first, because “the chip is locked” is the phrase they have heard. Separating the two before quoting is the single most valuable step in the conversation, because one leads to an extraction project and the other leads to a repair.

What a bulk erase touches

A chip erase on this family returns the entire array to its erased state, which on this process means all ones. It does not selectively clear the protection bit while preserving the code, because there is no per-block structure to address: the array is one block and the configuration word is written through a separate command that the erase also resets. Anyone who has worked with parts offering a protected boot block expects finer granularity, and this family does not have it.

What the erase does not fix

Clearing the protection returns the part to blank, and a blank part is not a repaired part. The next step is programming an image, and the image has to come from somewhere: a copy held by the customer, a twin unit on the same production run, or a reconstruction. That is why the sequence matters even for customers who say they do not need the code, because the code is what they will need the moment the erase finishes. The erase does not create a working device, it creates an empty one.

The twin that is not a substitute

Where a second identical unit exists, the temptation is to read the unprotected twin and treat it as the original. On this part that is usually acceptable, because there is no per-die calibration word to lose and the configuration is a design decision rather than a measurement. It becomes unacceptable the moment the two units differ, which happens when a run was reworked or one unit was field-updated. Compare the two before trusting either.

The fork, stated as a table

What the customer wants Is it possible What it costs
Read the code out of a locked part Yes, by the physical route Decapsulation and imaging
Unlock the part and keep the code No Nothing, it cannot be done
Unlock the part and reuse it Yes, by erasing The code, permanently
Get a working unit back Usually, by repair or clone Depends which fault

The second row is the one that has to be delivered without hedging. It is not a limitation of a particular workshop or a particular tool; it is a property of the device, and a supplier who implies otherwise is either misunderstanding the question or selling time.

Why the customer usually asks for both

The request for an unlock without data loss almost always comes from a maintenance situation: a line is down, the original source is lost, and the fastest fix looks like getting the existing part working again. What that customer actually needs is either a repair of the board around the part, or a replacement unit built from a recovered image. Both are available; neither is an unlock. Reframing the request is part of the job, and the framing is the same one used in copying a microcontroller.

The order that protects the option

If there is any chance the image will be needed, read first and erase never. That sounds obvious and is regularly violated, because erasing is fast, requires no equipment and appears to solve the immediate problem. Once done, the array is gone and the physical route has nothing to read. Where the part is already erased on arrival, say so plainly and quote the rebuild instead of a read that cannot happen.

The parts where the answer differs

The low-voltage sibling has its own failure mode, which is a configuration that locks the part out of programming without any protection being set, described in PIC16LF54 protection. The larger array in the same core is covered in PIC16F57 hex data, where the file format becomes the awkward part. The general decision tree for a device that resists is in breaking an IC.