PostHeaderIcon PIC16LF54 Protection: Locked Out Is Not the Same as Locked

A part can refuse to cooperate for two entirely different reasons, and the second one is not protection at all. It is a configuration: low-voltage programming turned off in the configuration word, the reset pin reassigned as an ordinary input, and suddenly no programmer can start a session, no matter what the protection bit says.

Break IC PIC16LF54 Protection and extract code from MCU PIC16LF54, crack Microcontroller PIC16LF54 fuse bit and decapsulate package

The check that separates the two

Put the part in a socket and ask for its device ID. A part with code protection set still answers, because the ID read is a separate command that protection does not block. A part that has been locked out does not answer at all, because the interface never opens. That single difference decides the route, and it takes seconds to establish. A bench that skips it will spend an afternoon on a part that has told it, correctly, that it is in a different state.

What the configuration actually does

The configuration word on this core is not in the address space; it is written and read by a dedicated command, and it holds the oscillator mode, the watchdog, the protection bit and the programming-mode options. Disabling low-voltage programming removes the ordinary entry path and leaves only the high-voltage one, which requires a supply above the normal operating range on a specific pin. Assigning that pin as a digital input removes the reset function that the high-voltage entry depends on. Together they are a one-way door: the device runs its program perfectly and cannot be reprogrammed by any programmer.

What high-voltage entry costs

The entry itself is undramatic when the sequencing is right and destructive when it is not. The supply has to come up first, the programming voltage has to arrive on a pin that may also be an I/O, and any current into that pin while the rest of the device is unpowered finds a path through the protection diodes. On a bench with a socket and a controlled fixture the risk is manageable. On a board with the part soldered in place and the rest of the circuit still connected, that same pin is attached to whatever the designer attached it to, and the answer is usually to remove the part.

When the device is in a product

A locked-out part inside a working product is common, because a firmware update failed halfway and the configuration ended up in a state the bootloader cannot recover from. Two routes exist: lift the part and program it on a bench, or find a test point arrangement that isolates the programming pins. The second is faster when the board has a header and much slower when it does not, and the decision is made by inspection rather than by preference. Either way the customer should be told that the session has to be attempted on a part that is already not working, so a further failure costs nothing that was not already lost.

Which state you are in

Symptom Likely state Route
Device ID answers, read returns zeros Code protected Physical route
Nothing answers, part still runs Locked out by configuration High-voltage or physical
Nothing answers, part does not run Damaged or clock fault Diagnose before quoting
Read succeeds and code looks right Not protected Verify and deliver

The third row catches people. A part that is silent and also does not run is not locked out, it is broken, and the honest reply is about the fault.

Getting back in

The high-voltage path exists for exactly this case: raise the programming pin above the normal supply while sequencing the supplies correctly, and the interface opens even with low-voltage programming disabled. If the pin was reassigned as an input this still works, because the reassignment affects the digital function in normal operation, not the high-voltage detector. What it does not survive is protection being set as well, in which case the session opens and the array still returns zeros.

Why the distinction matters commercially

A locked-out part is often a repairable part. The configuration can be corrected in a short session, the device goes back into the product, and the customer keeps the unit they already had. A protected part is an extraction job with a different price and a different schedule. Quoting the second when the first is true overcharges the customer; quoting the first when the second is true wastes everyone’s time. That is the same discipline that keeps breaking an IC from being sold as a single product.

The related cases

The plain-voltage sibling and its erase behaviour are covered in reverse locked PIC16F54, and the supply question that decides whether the entry can be attempted on the board at all is in PIC16LF57 program. When neither entry path works, the die-level options are the ones described in attacking an MCU.

Comments are closed.