PostHeaderIcon MSP430G2513: Three Different Things People Mean by Unlocking

Unlock is a word from the customer’s vocabulary, not from the device’s. It arrives in an email describing a symptom — the programmer says the chip is locked — and it can mean four different situations, three of which involve the device and one of which does not.

Sorting out which one is meant takes a short conversation and prevents the most common form of wasted session: applying the fix for one meaning to a device that has a different one.

Meaning one: the protection is engaged

This is what the word means technically. A location in the array has been programmed, the debug interface is refused access to the array, and the device continues to execute normally.

Three substates, which matter for the plan:

The password is blank, meaning the locking location holds its erased value. In that case the device is not protected at all, and the refusal has another cause.

The password is conventional — derived from a part number, a date code, a constant. In that case the module opens with a bounded search.

The password is not derivable. In that case the module does not open, and the word unlock describes a wish rather than an operation.

Substate Evidence Plan
Not actually protected Reads succeed on a known-populated address Find the real cause of the refusal
Conventional password Bounded search succeeds Read the array
Random password Search fails, device otherwise healthy Analysis or physical, not search

Meaning two: the debug port was never connected

A product with fourteen usable pins cannot spare two for a debug interface. The pins are reused for functions, and in the finished product there is nowhere to attach a debugger.

This produces exactly the message that protection produces, from a tool that cannot distinguish between a device that refuses and a device that is not reachable. The device may be entirely unprotected.

The check is electrical and was described earlier in this series: confirm the interface works on a device known to be open. If it does not, the problem is the connection and the word locked is a misdiagnosis.

Meaning three: the loader password is unknown

Separate from the array protection, the loader has its own password, and it is derived from a region of the device’s memory rather than stored as a secret.

That derivation creates a dependency that is worth stating clearly, because it explains a pattern that otherwise looks arbitrary: a loader can be entered on a device whose array is protected but whose vector table can be obtained, and cannot be entered on a device where nothing can be read.

So the loader is not a general answer to protection. It is a specific route with a specific precondition, and asking whether that precondition holds is a five-minute question.

Meaning four: read the program out

This is the most common meaning in practice and the least like the others. The customer does not want the lock removed; they want the content. The lock is simply the obstacle they have identified.

Treating it as an unlocking problem leads to work on the protection. Treating it as a content problem leads to a different set of questions: what is on the board, does the program export anything, is there a second unit, and what is the content actually needed for.

On a great many devices the second framing produces a result without the protection ever being addressed.

How to settle which one

Four questions, in order, each of which eliminates possibilities.

  1. Does the device execute its product function? If not, the problem may be damage or a blank device rather than protection.
  2. Does the debug interface connect at all? If not, the problem is electrical.
  3. With the interface connected, does a read of a known-populated address return real data? If yes, there is no protection.
  4. If the array is refused, is the password blank, conventional, or unknown?

The answers place the device in one of the cases above, and the case determines the plan. The whole conversation takes ten minutes on a bench and can be had by email with a customer who has a programmer.

Why the vocabulary matters beyond politeness

Using the customer’s word without defining it has a cost that appears later: the scope. A customer who asked for unlocking and received an extracted image has received more than they asked for and will negotiate the price accordingly. A customer who asked for unlocking and received an explanation that their device is unprotected and the problem is their programming fixture has received exactly what they needed.

Naming the operation precisely, in the quotation, protects both sides. It also makes the delivery verifiable, because an operation that has been named can be confirmed or refuted.

What unlocking cannot do

Two limits are worth stating because they are frequently assumed away.

Removing protection does not recover a program that was erased. The transition that opens the array erases it, and no technique changes that ordering.

And unlocking a device whose program is not in it produces nothing. On designs that execute from an external memory, the internal array may hold only a loader, and the protected device is not the subject.

Related reading

FAQ

Can unlocking be done without erasing? The documented transition erases. That is the design, not a limitation.

Does a blank password mean unprotected? It means the lock is engaged with a guessable value.

Is the loader password stored in the device? It is derived from device memory rather than stored as a separate secret.

What if the customer means read the program out? Then the plan is a content plan, and the protection is one consideration among several.

Conclusion

Unlock describes four situations and only one of them is about a lock. Establish whether the device executes, whether the interface connects, whether a read succeeds, and what the password state is. The answer names the operation, and a named operation can be quoted, executed and verified.

Comments are closed.