Archive for the ‘Break IC’ Category

PostHeaderIcon Break ATtiny84 protected source code

A request to break ATtiny84 protected source code begins with the fact that ATtiny84 carries 8 KB of in-system programmable flash and 512 bytes of SRAM and runs at 20 MHz in a 14-pin SOIC body. The work starts with the lock byte and the fuse bytes, because a tinyAVR guards its small arrays with lock bits and reaches its debug port over the reset line.

прекъсване на AVR MCU ATtiny84 защитен изходен код от защитена флаш памет и криптирана eeprom памет, възстановяване на изгубен вграден фърмуер на оригиналния микроконтролер ATtiny84 чрез технология за обратно инженерство.

прекъсване на AVR MCU ATtiny84 защитен изходен код от защитена флаш памет и криптирана eeprom памет, възстановяване на изгубен вграден фърмуер на оригиналния микроконтролер ATtiny84 чрез технология за обратно инженерство.

reading the protection state before you break ATtiny84 protected source code

A tinyAVR protects its memory with a lock-bit byte in the same AVR tradition, but on a smaller map and without the boot-section split of the larger parts. LB1 and LB2 are the memory lock bits: with both unprogrammed the flash, EEPROM and fuse bytes read freely over the serial programming interface, and programming both closes external read-back so a programmer receives blank words for the arrays. The fuse bytes carry CKSEL and SUT for the clock, CKDIV8 for the divider, CKOUT for the clock output, RSTDISBL for the reset pin, DWEN for the debug interface, SPIEN for serial programming, EESAVE for the EEPROM and BODLEVEL for the brown-out threshold. Some members add SELFPRGEN, which decides whether code running on the chip may rewrite its own program array. The lock and fuse bytes stay readable while the arrays do not, so the first bench move is a read of those bytes rather than an erase.

Break AVR MCU ATTINY84 Protected Source Code

Break AVR MCU ATTINY84 Protected Source Code

what the ATtiny84 array and erase cost mean

On the ATtiny84 the 8 KB program array is written a page at a time and erased as a whole, beside 512 bytes of SRAM and 512 bytes of data EEPROM. There is no separate boot block to negotiate with: the whole array is application space on this class of device, which is why the boot lock bits used on larger AVR parts have no counterpart here. A chip erase is the only operation that clears the lock bits, and it wipes the flash and, unless EESAVE is set, the EEPROM at the same moment. The 14-pin SOIC body with 14 pins changes none of that arithmetic, since the array size is fixed by the ordering code and the package letters only describe the lead frame.

ATtiny84 recovery geometry Value
Program flash 8 KB, page-programmable, no boot block
Data EEPROM 512 bytes, cleared by chip erase unless EESAVE
SRAM 512 bytes
Core and clock AVR RISC at 20 MHz, debugWIRE on the reset line
Protection lock bits LB1/LB2, fuse bytes
Package 14-pin SOIC, 14 pins
break AVR MCU ATTINY84 protected source code and extract embedded firmware from secured microcontroller ATTINY84 by binary software or heximal program, copy ATTINY84 encrypted microprocessor content to new MCU;

break AVR MCU ATTINY84 protected source code and extract embedded firmware from secured microcontroller ATTINY84 by binary software or heximal program, copy ATTINY84 encrypted microprocessor content to new MCU;

the ATtiny84 programming interface under protection

These parts are programmed over the serial interface using the reset, clock and data pins, and the same three wires return the fuse and lock bytes. The on-chip debug system is debugWIRE, a single-wire interface multiplexed onto the reset line and enabled by the DWEN fuse, rather than a multi-pin boundary-scan port. Under a set lock byte the array read fails while the device still executes its firmware and still answers a signature request. The routes are therefore a clean read with the lock byte open, a firmware-assisted dump where SELFPRGEN allows in-application writes, or an approved chip erase.

złamać chroniony kod źródłowy mikrokontrolera AVR ATTINY84 i wyodrębnić oprogramowanie sprzętowe z zabezpieczonego mikrokontrolera ATTINY84 za pomocą oprogramowania binarnego lub programu heksametalogowego, skopiować zaszyfrowaną zawartość mikroprocesora ATTINY84 do nowego mikrokontrolera;

złamać chroniony kod źródłowy mikrokontrolera AVR ATTINY84 i wyodrębnić oprogramowanie sprzętowe z zabezpieczonego mikrokontrolera ATTINY84 za pomocą oprogramowania binarnego lub programu heksametalogowego, skopiować zaszyfrowaną zawartość mikroprocesora ATTINY84 do nowego mikrokontrolera;

the decision tree for a break ATtiny84 protected source code job

Read the fuse and lock bytes first and check DWEN and RSTDISBL, because the result settles both the recovery route and which programmer can reach the part. An open lock byte means a clean read and a direct heximal, while a fully locked part leaves only the destructive erase. The ATtiny84 is the 8 KB of flash device in a 14-pin SOIC body, so the capacity marking and the package settle the array size before anything is priced. The 14-pin body and the universal serial interface identify this small group. What survives the lock: the fuse and lock bytes, the device signature, the calibration value, the peripheral registers while the chip runs, and the EEPROM if EESAVE was programmed before any erase.

взломать защищенный исходный код микроконтроллера AVR ATTINY84 и извлечь встроенную прошивку из защищенного микроконтроллера ATTINY84 с помощью двоичного программного обеспечения или шестнадцатеричной программы, скопировать зашифрованное содержимое микропроцессора ATTINY84 в новый микроконтроллер;

взломать защищенный исходный код микроконтроллера AVR ATTINY84 и извлечь встроенную прошивку из защищенного микроконтроллера ATTINY84 с помощью двоичного программного обеспечения или шестнадцатеричной программы, скопировать зашифрованное содержимое микропроцессора ATTINY84 в новый микроконтроллер;

what the neighbouring parts tell you about ATtiny84

When a board carries only a partial marking, the tinyAVR family is the place to look, because its members share the lock byte, the debugWIRE port and the same erase coupling while differing in flash, SRAM, EEPROM, pin count and peripherals such as the universal serial interface and the high-speed timer. Neighbouring members span 2 KB to 8 KB of flash in 14-pin to 32-pin bodies, with the low-voltage V grades trading clock speed for a wider supply range while keeping the same lock byte and debugWIRE port. The package marking and the signature read over the programmer settle which member is present before any protection work begins.

Related work on break mcu atmega128a flash, break mcu atmega162a heximal, break mcu atmega16pa flash follows the same order of operations, while break mcu atmega261pa program covers the next capacity step and break mcu attiny24v flash the larger package.

बाइनरी सॉफ्टवेयर या हेक्सिमल प्रोग्राम द्वारा AVR MCU ATTINY84 संरक्षित स्रोत कोड को तोड़ना और सुरक्षित माइक्रोकंट्रोलर ATTINY84 से एम्बेडेड फर्मवेयर निकालना, ATTINY84 एन्क्रिप्टेड माइक्रोप्रोसेसर सामग्री को नए MCU में कॉपी करना;

बाइनरी सॉफ्टवेयर या हेक्सिमल प्रोग्राम द्वारा AVR MCU ATTINY84 संरक्षित स्रोत कोड को तोड़ना और सुरक्षित माइक्रोकंट्रोलर ATTINY84 से एम्बेडेड फर्मवेयर निकालना, ATTINY84 एन्क्रिप्टेड माइक्रोप्रोसेसर सामग्री को नए MCU में कॉपी करना;

what to hand back for a break ATtiny84 protected source code request

For a board that arrived as a break ATtiny84 protected source code request, the deliverable is a confirmed capacity, a lock-byte state and a priced route agreed in writing before any destructive step, and our engineers read the fuse and lock bytes first.

PostHeaderIcon Break MCU ATMEGA861V Flash

Breaking MCU ATMEGA861V Flash involves a complex process of reverse engineering, often aimed at bypassing the security mechanisms protecting the firmware stored in ATMEGA861V microcontroller. This process requires advanced knowledge of microprocessors and embedded systems. The goal is to crack the protections of ATMEGA861V and decrypt the firmware, allowing access to the binary or hexadecimal code that controls the MCU’s functions. By decoding this protected data, engineers can copy, modify, or analyze the underlying software.

Breaking MCU ATMEGA861V Flash involves a complex process of reverse engineering, often aimed at bypassing the security mechanisms protecting the firmware stored in ATMEGA861V microcontroller. This process requires advanced knowledge of microprocessors and embedded systems. The goal is to crack the protections of ATMEGA861V and decrypt the firmware, allowing access to the binary or hexadecimal code that controls the MCU’s functions. By decoding this protected data, engineers can copy, modify, or analyze the underlying software.

Breaking MCU ATMEGA861V Flash involves a complex process of reverse engineering, often aimed at bypassing the security mechanisms protecting the firmware stored in ATMEGA861V microcontroller. This process requires advanced knowledge of microprocessors and embedded systems. The goal is to crack the protections of ATMEGA861V and decrypt the firmware, allowing access to the binary or hexadecimal code that controls the MCU’s functions. By decoding this protected data, engineers can copy, modify, or analyze the underlying software.

Microcontrollers like the ATMEGA861V are designed with safeguards to prevent unauthorized access to their internal flash memory, which stores crucial firmware. However, reverse engineering experts use sophisticated techniques to decrypt and decode this data, exposing the microcontroller’s inner workings. This involves analyzing the binary and hexadecimal representation of the code to understand its behavior and structure.

While the intention behind breaking MCU flash memory can range from system recovery to creating compatible hardware, the ethical implications remain significant. Unauthorized copying or modification of firmware can infringe on intellectual property rights, so the process of breaking MCU ATMEGA861V Flash should be approached with care, considering both the technical challenges and legal boundaries.

Break MCU ATMEGA861V Flash

Break MCU ATMEGA861V Flash

A 50% duty cycle clock can be programmed to come out on P1.0, as shown in above Figure. This pin, besides being a regular I/0 pin, has two alternate functions when Attack IC ADUC831BSZ Firmware. It can be programmed to input the external clock for Timer/Counter 2 or to output a 50% duty cycle clock ranging from 61 Hz to 4 MHz at a 16 MHz operating frequency.

To configure the Timer/Counter 2 as a clock generator, bit C/T2 (T2CON.1) must be cleared and bit T2OE (T2MOD.1) must be set. Bit TR2 (T2CON.2) starts and stops the timer.

The clock-out frequency depends on the oscillator frequency and the reload value of Timer 2 capture registers (RCAP2H, RCAP2L) in order to Break MCU AT89C5131A Binary, as shown in the following equation.
In the clock-out mode, Timer 2 rollovers will not generate an interrupt. This behavior is similar to when Timer 2 is used as a baud-rate generator in order to Break Chip PIC16F720 Firmware. It is possible to use Timer 2 as a baud-rate generator and a clock generator simultaneously.

MCU ATMEGA861V फ्लैश को तोड़ने में रिवर्स इंजीनियरिंग की एक जटिल प्रक्रिया शामिल होती है, जिसका उद्देश्य अक्सर ATMEGA861V माइक्रोकंट्रोलर में संग्रहीत फर्मवेयर की सुरक्षा करने वाले सुरक्षा तंत्र को बायपास करना होता है। इस प्रक्रिया के लिए माइक्रोप्रोसेसर और एम्बेडेड सिस्टम के उन्नत ज्ञान की आवश्यकता होती है। इसका लक्ष्य ATMEGA861V की सुरक्षा को तोड़ना और फर्मवेयर को डिक्रिप्ट करना है, जिससे MCU के कार्यों को नियंत्रित करने वाले बाइनरी या हेक्साडेसिमल कोड तक पहुँच प्राप्त हो सके। इस संरक्षित डेटा को डिकोड करके, इंजीनियर अंतर्निहित सॉफ़्टवेयर की प्रतिलिपि बना सकते हैं, उसे संशोधित कर सकते हैं या उसका विश्लेषण कर सकते हैं।

MCU ATMEGA861V फ्लैश को तोड़ने में रिवर्स इंजीनियरिंग की एक जटिल प्रक्रिया शामिल होती है, जिसका उद्देश्य अक्सर ATMEGA861V माइक्रोकंट्रोलर में संग्रहीत फर्मवेयर की सुरक्षा करने वाले सुरक्षा तंत्र को बायपास करना होता है। इस प्रक्रिया के लिए माइक्रोप्रोसेसर और एम्बेडेड सिस्टम के उन्नत ज्ञान की आवश्यकता होती है। इसका लक्ष्य ATMEGA861V की सुरक्षा को तोड़ना और फर्मवेयर को डिक्रिप्ट करना है, जिससे MCU के कार्यों को नियंत्रित करने वाले बाइनरी या हेक्साडेसिमल कोड तक पहुँच प्राप्त हो सके। इस संरक्षित डेटा को डिकोड करके, इंजीनियर अंतर्निहित सॉफ़्टवेयर की प्रतिलिपि बना सकते हैं, उसे संशोधित कर सकते हैं या उसका विश्लेषण कर सकते हैं।

Note, however, that the baud-rate and clock-out frequencies cannot be determined independently from one another since they both use RCAP2H and RCAP2L when break MCU flash.

The UART in the ATmega861v operates the same way as the UART in IC Cloning. For further information, see the October 1995 MMCUrocontroller Data Book, page 2-49, section titled, “Serial Interface.”

The serial peripheral interface (SPI) allows high-speed synchronous data transfer when Break Microcontroller PIC16F767 Firmware between the ATMEGA861V and peripheral devMCUes or between several ATMEGA861V devMCUes.

The ATmega861V SPI features include the following:
Full-Duplex, 3-Wire Synchronous Data Transfer
Master or Slave Operation
1.5-MHz Bit Frequency (max.)
LSB First or MSB First Data Transfer
Four Programmable Bit Rates
End of Transmission Interrupt Flag
Write Collision Flag Protection
Wakeup from Idle Mode (Slave Mode Only)

شکستن فلش MCU ATMEGA861V شامل یک فرآیند پیچیده مهندسی معکوس است که اغلب با هدف دور زدن مکانیسم های امنیتی محافظت از سیستم عامل ذخیره شده در میکروکنترلر ATMEGA861V انجام می شود. این فرآیند نیازمند دانش پیشرفته ریزپردازنده ها و سیستم های تعبیه شده است. هدف این است که حفاظت ATMEGA861V را شکسته و سفت‌افزار را رمزگشایی کند تا به کد باینری یا هگزادسیمال که عملکردهای MCU را کنترل می‌کند، دسترسی داشته باشید. با رمزگشایی این داده های محافظت شده، مهندسان می توانند نرم افزار زیربنایی را کپی، اصلاح یا تجزیه و تحلیل کنند.

شکستن فلش MCU ATMEGA861V شامل یک فرآیند پیچیده مهندسی معکوس است که اغلب با هدف دور زدن مکانیسم های امنیتی محافظت از سیستم عامل ذخیره شده در میکروکنترلر ATMEGA861V انجام می شود. این فرآیند نیازمند دانش پیشرفته ریزپردازنده ها و سیستم های تعبیه شده است. هدف این است که حفاظت ATMEGA861V را شکسته و سفت‌افزار را رمزگشایی کند تا به کد باینری یا هگزادسیمال که عملکردهای MCU را کنترل می‌کند، دسترسی داشته باشید. با رمزگشایی این داده های محافظت شده، مهندسان می توانند نرم افزار زیربنایی را کپی، اصلاح یا تجزیه و تحلیل کنند.

PostHeaderIcon ATtiny261: A Wider Vector Table Means More to Verify

Peripheral count drives vector count. A twenty-pin part with a comparator, an ADC, two timer channels and a serial port has more interrupt sources than an eight-pin part with one timer, and every source needs an entry in the table at the bottom of the flash.

That table is the most structured thing in the image, and on this part it is long enough to be a real alignment and completeness test rather than a formality.

What the table looks like

The reset vector sits at address zero and is a jump. The interrupt vectors follow at a fixed spacing, one slot per source, most of them also jumps to the handler. Sources that the build does not use are usually filled with a jump to a common default handler, which is itself informative: a table full of identical targets means the firmware handles almost nothing asynchronously.

Four patterns are worth recognising:

Table pattern What it means What it tells you
All unique targets Event-driven design Behaviour lives in the handlers
Mostly one target Interrupts enabled, unhandled The stubs return immediately
Mixed, with gaps The realistic case Which peripherals matter
Targets past the table Handlers inline after the table Read them as a block

The fourth row is the one that catches people out. When every target lands just past the last entry, the handlers are written inline immediately after the table, and the block that follows is code rather than data. Reading it as code is the difference between finding the logic and missing it.

Why this is a verification tool

A vector table is a known structure at a known address. If the image is correctly aligned and complete, every slot decodes as a valid jump. If the image is off by a byte, the slots decode as instructions that do not exist in the instruction set.

That makes the table a stronger check than any checksum, because a checksum only proves the bytes are the bytes that were read. The table proves the bytes are correctly placed.

The check costs a disassembly of the first few dozen words. On a part this size it is the first thing worth doing after the read completes.

Peripherals and what they imply about the program

A twenty-pin part has room for analogue and digital functions that a smaller package cannot support. In practice that means the firmware usually has:

  • An ADC path, with calibration constants.
  • A comparator path, sometimes used for a threshold rather than a measurement.
  • A serial port, which means a protocol implementation.
  • Timer channels used for PWM, which means the code computes duty cycles.

Each of those corresponds to a cluster of code and a set of constants. Locating the clusters is the practical work of understanding the image, and the vector table is the map: handler addresses point at the code that services each peripheral.

Lock state on this family

The same four-state encoding applies, with no boot section and therefore no boot lock bits. The protection model is one field, and the reasoning is short: readable, or not, and if not, the erase is the only exit and it takes the array.

What differs from the eight-pin members is accessibility. Twenty pins means the programming interface is less likely to be fully occupied by other functions, and in-circuit entry is more often practical. That is a small but real advantage when a device is still fitted to its board.

Reading order

  1. Supply at the design rail, measured at the socket.
  2. Signature and fuses. A part configured for a crystal that is not on the board will not answer.
  3. Lock byte.
  4. Full array read in pages, each read twice and compared.
  5. Disassemble the vector table and confirm the reset vector’s target lies inside the application region.

Step 5 is the completeness test specific to this part. On a longer table, a single misplaced byte produces a table that is visibly wrong, which is exactly the kind of evidence that is hard to obtain from bulk data.

Related notes

FAQ

Does every vector have to point at unique code? No. Shared handlers are common, and a table full of one target is a legitimate build.

Can the vector table be relocated? Not on this family. There is no boot section and no vector redirection.

Why is the table a better alignment test than a checksum? Because it has known structure. Misalignment makes it decode as invalid instructions, which a checksum cannot detect.

Does a longer table mean a bigger program? Not necessarily. It means more interrupt sources exist.

Conclusion

More peripherals mean more vectors, and a longer table is a better instrument. It verifies alignment, reveals which interrupts the firmware actually services, and indexes the code clusters behind each peripheral. On a twenty-pin part, that structure is the most reliable guide into an unfamiliar image.

PostHeaderIcon R7FA2L1A92DFL: The Configuration Words at the Bottom of the Array

Not everything in the code flash is code. At fixed addresses near the start of the array there are a handful of words that the hardware reads during reset, before the first instruction of the application executes, and uses to configure behaviour the core cannot configure for itself.

They are ordinary flash contents, programmed the same way as everything else, and erased the same way. That is what makes them dangerous: a routine erase that was meant to clear the application can silently change how the device starts.

Where they are and what they are called

The area is called option-setting memory, and it sits at fixed addresses in the code flash. It is not a separate array and it does not need a special command; it is simply a region whose contents mean something to the reset logic rather than to the program.

word group what it configures consequence if changed
watchdog settings whether the independent watchdog runs from reset, and its timeout a device that resets in a loop, or one with no protection
watchdog window the allowed refresh window resets that appear random in timing
voltage detection thresholds at which the part warns or resets behaviour on a sagging supply
oscillator configuration start-up behaviour of the internal high-speed source a device that starts slowly, or not at all
start-up options which interfaces are enabled out of reset a debug port that never appears

The first two rows account for the failure that reaches a bench most often. The independent watchdog is not disabled by a reset; whether it runs is a property of these words. Where they have been erased, the default applies, and the default is frequently «enabled».

Why they are flash rather than fuses

A fuse is set once and cannot be revisited cheaply. These are flash, which means they can be changed in the field, which means a firmware update can correct a configuration mistake — a real advantage for a product that ships in volume.

The cost of that choice is that they are vulnerable to the same operations as everything else. A whole-array erase removes them. A partial erase that happens to cover their region removes them. And an image restored from a different product may carry a different set of them, which silently changes the rules the device starts under.

property fuse-based configuration option-setting memory
can be changed after production no yes
erased by a whole-array erase no yes
travels with an image no yes, if the image covers that address
can be lost by a partial write no yes

The third row is the one with consequences for a recovery. Where a delivered image includes the configuration region, restoring it also restores the configuration — which is usually correct and occasionally catastrophic, if the destination board has different hardware.

The failure that looks like a brick

The classic presentation is a device that was erased, reprogrammed with a correct application image, and now resets every few hundred milliseconds without executing anything useful.

Nothing is wrong with the application. The configuration words were erased, the independent watchdog took its default state, and the application does not refresh it because in the original build it was not running.

observation what it suggests
resets at a fixed short interval watchdog running, not refreshed
resets at an irregular interval watchdog window, or a voltage threshold
runs for a while then resets watchdog timeout longer than first thought
never starts oscillator configuration, or a start-up option

The first row is diagnostic enough that it is worth knowing before shipping a unit back. A device that resets on a stopwatch is not a device with a firmware bug; it is a device whose start-up configuration no longer matches what the firmware expects.

What the report should state

The configuration words should be delivered in two forms: as bytes in the image, and as decoded values in the report.

The bytes matter because they are part of a faithful copy. The decoded values matter because they are the only thing that tells a customer whether their production image is complete. A customer who has been flashing only the application region has been relying on whatever configuration was in the part, and that reliance is invisible until it fails.

item why it belongs in the report
the words as read a faithful copy is what a recovery is for
the decoded watchdog state answers «will this reset on its own»
the voltage thresholds explains behaviour on a weak supply
whether the delivered image covers the region tells the customer whether their fixture is complete

The fourth item is the one that changes behaviour, because it turns an assumption into a statement.

Reading them out of an image

  1. Locate the region by its fixed address. Its position is a property of the part, not of the design.
  2. Decode the watchdog fields first, because they determine whether the device can run at all.
  3. Decode the voltage and oscillator fields next.
  4. Check whether the values look plausible or erased. All-ones in this region is not a valid configuration; it is a missing one.
  5. Note in the report whether the rest of the image assumes these values or overrides them at run time.

Step five is a distinction worth making. Some firmware reconfigures the watchdog in software immediately at start-up, which makes the option-setting value relevant only for the interval between reset and that code. Others rely on it entirely.

What the deliverable contains

The return set is the code flash image including the configuration region, the data flash separately, the configuration words decoded, the identification words as read, a disassembly with the vector table resolved, and a statement of what the device does at reset given those words.

A second page on this ordering code, written from the general extraction angle, is at R7FA2L1A92DFL binary extraction. The address-range restriction that may cover this region is covered in R7FA2L1AB2DFL flash recovery, and the boot path those start-up options affect in R7FA2L1AB2DFM software recovery.

FAQ

Are these words part of the program? No. They are flash contents read by hardware at reset, not instructions.

Can they be erased by accident? Yes. Any operation covering their addresses removes them, including a whole-array erase.

Does a correct application image restore them? Only if the image includes that address range. Many production images do not.

Conclusion

A handful of words at fixed addresses decide how the part behaves before any code runs, and they are as easy to erase as anything else in the array. Reading them is trivial; decoding them answers whether a device will reset itself in a loop; and stating in the report whether the delivered image covers them turns a silent assumption into something the customer can check.

PostHeaderIcon R7FA2L1A93CFM: Where the Touch Scan Lives in the Image

Most microcontrollers in this class are chosen for their core or their price. This group is frequently chosen for one block: a capacitive sensing unit in its second generation, which lets a product have a glass front panel with no moving parts.

That choice shapes the firmware. A touch design is not written as a collection of input handlers. It is written as data — a mask saying which electrodes exist, a table saying how sensitive each one is, and a set of baselines saying what each one reads when nothing is touching it — wrapped in a scan loop that keeps those baselines honest as the environment changes.

All of that survives into a recovered image, and it is usually the most legible part of it.

From capacitance to a number

The measurement is a count. An electrode has a capacitance to ground; a finger near it adds a small amount in parallel; the sensing block converts the difference into a digital value by counting charge-transfer cycles.

Self-capacitance measures each electrode against ground, which is simple and works through thick overlays. Mutual-capacitance drives one electrode and measures another, which needs two layers and is better at rejecting water films, because a water film couples to ground rather than between electrodes.

mode electrodes overlay tolerance water behaviour
self-capacitance one per key generous a film can look like a touch
mutual-capacitance one row and one column per node thinner a film is largely rejected

The mode is not visible as a flag in the image, but it is inferable from the channel counts: a design with twelve keys and twelve channels is self-capacitance; a design with twelve keys and eight channels is a matrix and therefore mutual.

The channel mask is a bitmap of the product

The sensing block is told which channels to scan by writing a bit pattern to a set of registers. Each bit corresponds to a physical channel, and setting it enables that channel for the next scan.

That bit pattern is, quite literally, a drawing of the product’s front panel. Ten bits set means ten electrodes. The positions of the set bits say which pins are used, and therefore which physical corner of the board each key occupies.

Reading it takes one pass through the initialisation code, and it answers the first question any customer asks about a touch product: how many keys does this firmware expect.

Thresholds and baselines are not the same thing

This distinction is the one that separates a working touch design from a flaky one, and both quantities appear in the image.

A threshold is a constant. It says how far a reading must deviate from its baseline before the firmware considers the key touched. It is set once, by the designer, and usually differs per channel because electrode sizes and overlay thicknesses differ.

A baseline is a variable. It is the reading the channel produces when untouched, and it drifts: temperature changes, humidity changes, the panel gains a fingerprint, the electronics age. The firmware maintains it continuously by tracking the reading slowly and only when no touch is present.

quantity constant or variable where it lives what it encodes
channel mask constant register image at start-up number and position of electrodes
threshold constant table in flash sensitivity, overlay thickness
release threshold constant table in flash hysteresis, prevents chatter
baseline variable RAM, initialised from flash what the panel read on a real board
drift rate constant code or table how fast the baseline follows the environment

The last row is the one that is almost never documented and always important. A drift rate that is too fast makes the panel cancel slow touches; too slow and the panel drifts out of range in a warm room. Finding the constant that sets it tells you what the designer was worried about.

Debounce, which is a number rather than a technique

Between a reading that exceeds a threshold and a key press that the application believes in, there is a count. Firmware requires the condition to hold for several consecutive scans before accepting it, and for several more before releasing.

That count is a small integer in the image, and it is a direct statement of the design’s scan rate and its tolerance for noise. At a hundred scans per second, a count of three means thirty milliseconds of confirmation — fast enough to feel instant, slow enough to reject a spike.

The low-power loop

Touch products spend most of their lives waiting. This sensing block can run during a low-power mode and wake the core when a channel crosses its threshold, which is the reason the part appears in battery-powered panels.

That arrangement puts the scan where a recovery reader does not expect it: not in a timer interrupt, but in the wake-up path from a low-power state. Finding the block that configures the wake condition, then the handler that runs after it, is the shortest route to the application.

Reading the touch section out of an image

  1. Locate the register writes that set the channel mask. The bit pattern is the electrode map.
  2. Follow the pointer that the scan routine uses for its per-channel constants. That table holds thresholds and release thresholds, usually as an array of equal-length records.
  3. Find where the baselines are initialised. The values are raw counts and they will be in a plausible band — non-zero, similar to each other, not full scale.
  4. Look for the drift update. It is usually a slow filter: a subtraction, a shift, an addition, applied only when no channel is active.
  5. Note the debounce count, and derive the scan rate from the timer configuration.

Steps one to three take an hour and produce a description of the product’s sensing surface that no other source provides.

What the deliverable contains

The return set is the code flash image, the data flash separately, the configuration words, the identification words as read, a disassembly with the vector table resolved, and the extracted touch parameters: channel mask, per-channel thresholds, initial baselines, drift constant and debounce count.

That parameter set is often the reason the job was commissioned. A customer rebuilding a panel needs to know what the old firmware expected, and those five items are the whole of that expectation.

The package limit on channel count is covered in R7FA2L1AB3CFM binary recovery. The array size that constrains how much of this fits is in R7FA2L1A93CFP binary recovery, and the wide supply range that matters on a battery-powered panel in R7FA2L1A92DFM program recovery.

FAQ

Can the number of keys be determined without the code? From the panel, by counting electrodes. From the image it is exact, from the channel mask.

Why do thresholds differ between channels? Because electrode area and overlay thickness differ. A uniform threshold makes some keys over-sensitive and others sluggish.

What happens if the baseline is wrong? The key reads as permanently pressed or never pressed, depending on the direction of the error. It is the most common field failure on touch products.

Conclusion

A touch panel is data before it is code. The channel mask draws the product, the threshold table sets its feel, and the drifting baseline keeps it honest. All three are in the image at known places, and extracting them gives a customer a specification for a panel they may have lost the drawings for.

PostHeaderIcon R7FA2L1A93CFL: Nineteen Channels, One Converter, and the Calibration Between Them

Nineteen analogue inputs and one converter is a ratio that shapes the firmware more than the datasheet suggests. There is no parallelism to hide behind: every measurement is a sequence of operations on a shared resource, and each step costs time that somebody had to budget.

For a reader, that is good news. A design that has to schedule nineteen inputs through one converter leaves a record of its priorities in the sequence it chose, and a record of its circuit assumptions in the sample time it set.

One converter, many inputs

The converter is a twelve-bit successive-approximation type, fed by a multiplexer. Only one channel is converted at a time; the multiplexer selects which input reaches the sample-and-hold, the conversion runs, and the result lands in a register.

property value consequence for a reader
resolution 12 bits about 0.8 mV per count on a 3.3 V reference
inputs up to 19, package-dependent the channel list is a product description
reference external or internal, selectable sets the scale of every constant
conversion modes single or continuous determines where the scan loop lives
sequencing hardware scan over a channel list the list records measurement priority
auxiliary input an internal temperature channel a channel that is never a sensor on the board

The last row is a useful landmark. A channel that measures the die temperature rather than an external signal appears in the sequence without a corresponding pin, and it is often the one entry a reader cannot explain from the schematic.

Sample time is a statement about the circuit

Before a conversion, the sample-and-hold capacitor has to charge to the input voltage. How long that takes depends on the source impedance, and the sample time is therefore a number that encodes an assumption about what is connected.

source type typical impedance what the firmware must do
buffered amplifier output low short sample time is fine
resistor divider for a thermistor moderate longer sample time, or an external capacitor
photodiode with a large series resistor high the longest sample time available, or a buffer
supply rail through a divider moderate long sample time also filters noise

A design that sets the shortest available sample time on a channel connected to a high-impedance source produces readings that are consistently low and slightly noisy, and nothing about the code looks wrong. Finding a short sample time beside a channel whose external circuit is a large resistor is the explanation for a whole class of «the readings are always a bit off» complaints.

The reverse case exists as well: a long sample time on every channel, which costs throughput for no reason and usually indicates firmware written by copying a configuration example.

The channel list is the product

Hardware sequencing means the converter can walk a list of channels without intervention. That list is written at start-up, and its order is not arbitrary: the designer put the important measurements first, because a scan takes time and the loop repeats.

Reading the list gives the number of analogue inputs the product actually uses, in priority order. Combined with the sample times, it distinguishes the sensors by type: a channel with a long sample time and a large scaling constant is a high-impedance sensor; a channel with a short sample time and a scaling factor near one is a supply measurement.

The constants that turn counts into units

After the conversion comes the arithmetic, and on a part without a floating-point unit that arithmetic is fixed point or integer with a shift.

Each measured quantity has a scaling path: a multiply by a constant, possibly an offset subtraction, and a shift that implements the division. Those constants are the physics of the product written in integers.

measured quantity what the constant represents how to recognise it
bridge or strain gauge sensitivity and excitation a multiply followed by a shift, offset near mid-scale
thermistor divider the divider ratio and the curve fit either a polynomial or a lookup table
current shunt the reciprocal of the shunt resistance a small multiply with a large shift
battery voltage the divider ratio a constant close to a simple ratio

A lookup table rather than a polynomial is a strong hint: it means the designer had a calibration curve measured rather than derived, which usually means the product was characterised on real units.

Calibration values stored in the array

Some designs store per-unit calibration in the data flash: a zero offset measured with a shorted input, a gain correction measured against a reference. Those values are per-device, which makes them the one part of the analogue chain that cannot be reconstructed from the code alone.

Where such values exist, they should be delivered both in the data flash image and in the report as numbers. A customer replacing a failed unit needs them, and a customer reflashing an old image onto a new part inherits the old part’s calibration unless somebody notices.

Reading the analogue section

  1. Find the multiplexer and control register writes at start-up. The channel sequence is there.
  2. Note the sample time field for each channel, and compare it against the sequence length: the two together give the scan period.
  3. Locate the conversion-complete handling. It is either a polling loop or an interrupt on the end of the sequence.
  4. Follow the arithmetic applied to the result registers. The constants are nearby, usually as an array indexed by channel.
  5. Look in the data flash for a calibration block with per-unit values.

Steps one to four take an afternoon and produce a specification for the product’s measurement chain, which is frequently more useful than the disassembly.

What the deliverable contains

The return set is the code flash image, the data flash separately, the configuration words, the identification words as read, a disassembly with the converter configuration annotated, a table of the channel sequence with sample times, and the scaling constants written out as arithmetic.

That table plus the constants is the analogue half of the product, in a form an engineer can check against a schematic.

The package limit on how many channels exist is in R7FA2L1AB3CFM binary recovery. The sensing block that shares the same pins is in R7FA2L1A93CFM firmware recovery, and the reference and supply consequences in R7FA2L1A92DFM program recovery.

FAQ

Is there a factory calibration value for the converter? Not a per-channel one that replaces the design’s own calibration. Per-unit offsets and gains, where they exist, are written by production programming into the data array.

Why does sample time matter on a slow signal? Because the sample-and-hold must charge through the source impedance. Too short a time produces a low reading regardless of the signal.

Can the reference be internal? Yes, selectable. Which was chosen determines the scale of every constant and is visible in the configuration.

Conclusion

A multiplexed converter turns an analogue design into a schedule and a set of integers. The channel sequence states what the product measures and in what order; the sample times state what it believes about the circuits; the constants state what the numbers mean. All three are in the image, and together they reconstruct the measurement half of a product whose drawings are usually long gone.

PostHeaderIcon STM32H745: Two Processors, One Flash, and Half a Delivery

Most microcontrollers answer the question “what is the program” with one vector table and one entry point. This part answers it twice. There are two cores on the die, they share one flash array, and the second one starts not because the first one tells it to but because a configuration bit was programmed at the factory or on the line. An image can be read out completely, checksum correctly, disassemble into sensible code, and still be half of the program.

The arrangement

One core is the high-performance processor, the other is a smaller and slower one intended for the work that does not need the big core: a communication stack, a real-time loop, housekeeping. They share memory and they share the flash array.

element high-performance core second core
clock up to twice the second core’s rate half the first core’s rate
vector table at the flash base by default at an address configured separately
startup trigger reset a configuration bit, not a software call
typical role application, display, maths protocol stack, control loop, supervision

The third row is the one that decides whether a recovery is complete. Nothing in the first core’s code has to contain a “start the other core” call for the second core to run. It boots because the configuration says it should.

Where the second program lives

The second core’s code is in the same array, at an address the first core does not use. That address is not fixed by the silicon — it is a design decision, recorded in configuration and in the first core’s linker script.

what to look for how it appears in a dump what it tells you
a second vector table an initial stack pointer inside a RAM region the first core does not use, followed by a reset vector inside the flash the second program exists and where it begins
a large unclaimed gap in the address map flash that is neither code nor erased where the split was drawn
two different initial stack pointers two words at two addresses, both plausible both programs are present
strings and tables with no referencing code data in a region nothing in the first program points at the second program’s constants

The first row is the reliable test, and it works because the two cores do not share a RAM layout. The high-performance core’s stack sits in one region; the second core’s sits in another. Two initial stack pointers in two different RAM regions is not a coincidence.

Why a half delivery looks complete

The failure is not that the tool fails. It is that everything succeeds.

observation during the job the wrong conclusion what is actually true
a vector table at the base, sensible code after it the program has been recovered one of the two programs has been recovered
the rest of the array reads as data or erased nothing else is programmed the second program may be there but not recognised
the image runs on a bench setup the recovery is validated it validates one core, with the other held in reset
the customer reports the device does not work the image is damaged the second core never started

The last row is the one that costs a second round trip. A board with the second core held in reset often still boots far enough to look alive, which makes “it works” a premature conclusion.

The configuration bit that enables it

The second core’s start is controlled by an option byte, and the state of that byte is as much a part of the deliverable as the code is.

option state behaviour at reset consequence for a restore
second core enabled, boot address set both cores start restore must include both programs and the option bytes
second core disabled only the first core starts a restore of both programs alone will not bring the second one up
boot address left erased second core starts from an undefined location behaviour depends on what happens to be at that address

The second row is the trap. A customer who has erased the device and restored the two program images, without restoring the option byte, gets a board that runs half the application and reports no error. The code is right and the configuration is missing.

Communication leaves traces

Where two programs cooperate, they have to synchronise, and the mechanisms used for that are visible in both programs.

mechanism what appears in the image what it proves
hardware semaphores an initialisation loop taking a fixed number of them, and take/release pairs the two programs coordinate, so both are expected to run
inter-processor channels channel configuration and a shared buffer address one core is a producer and the other a consumer
shared memory with a flag word a word written by one side and polled by the other the split is a protocol, not just two programs in one array

Finding the semaphore initialisation in the first program is close to proof that a second program exists, even before it is located. Designs do not take hardware semaphores for their own use.

What a complete return looks like

The return set is both program images with their boundaries stated, the vector table of each resolved, the option bytes decoded with the second core’s enable state called out, a disassembly annotated at both entry points, and a statement of how the two programs exchange data.

A related reading of the same generation, from the flash bank angle rather than the core angle, is at STM32H743 flash recovery. The display pipeline that occupies the largest structured block of memory on the sibling part is covered in STM32H747 heximal recovery, and the clock and voltage mode that bounds both cores’ speed in STM32H723 heximal extraction. For the read-out restrictions on a smaller STM32 part, STM32F358VC flash breaking covers the protection side.

FAQ

Does the first core have to start the second one? No. The second core starts because of a configuration bit, independently of anything the first core’s code does.

Can both programs be recovered in one read? Yes, they are in the same array; the work is recognising where one ends and the other begins.

Why does the board appear to work after a partial restore? Because the first core runs, and a board with one core running often looks alive until something asks it to do the second core’s job.

Conclusion

Two processors sharing one array means two programs, two entry points and one configuration bit that decides whether the second one ever runs. Delivering both images without the bit is a half delivery that validates on a bench and fails in the field, and the difference is stated in a report or discovered by the customer.

PostHeaderIcon R7FA2L1AB2DNE: Eighty-Five Degrees, and What Heat Does to a Stored Image

Every flash cell stores a bit as charge on a floating gate. The charge is not held perfectly: it leaks, slowly at room temperature and much faster as temperature rises, and each erase-write cycle leaves the insulation slightly more leaky than it was before.

That process is why retention is specified with a temperature attached, and it is why the temperature digit in an ordering code is more than a line in a datasheet. A part that has spent a decade at the top of its range is not the same object as one that has spent a decade on a shelf.

What heat actually does

Two distinct effects matter, and they pull in opposite directions.

The first is charge loss from programmed cells. A cell that was written to hold a zero gradually drifts toward the erased state. Eventually it reads as a one, and the program has a bit flipped.

The second is charge gain in erased cells, and in cells disturbed by repeated reading of their neighbours. These drift toward the programmed state, and produce the same result from the other side: a bit that reads wrongly.

Both effects are accelerated by temperature during storage, not only during operation. A device that sat in an enclosure at 85 °C for years has accumulated far more of both than one that ran cool, and nothing about its marking distinguishes the two.

The failure is sparse, not total

This is where the intuition goes wrong. Aging does not usually produce a blank part or an unreadable one. It produces isolated bit errors, scattered through the array, in a distribution that depends on how the program is laid out.

failure how it presents how it differs from aging
wrong base address every vector wrong, code nonsense total, immediate
byte-order error pairs of bytes swapped throughout regular, structural
truncated read valid content then a run of erased values positional
interface failure nothing reads, or all zeros total
retention loss isolated bits wrong, everything else fine sparse, random

The last row is the one that gets misdiagnosed, because a sparse error looks like a bad read and invites a second attempt with the same tool, which produces the same result. The read is deterministic: the same cell returns the same wrong value every time until something changes it.

The other characteristic of retention loss is that it clusters by page and by write history. Cells written in the same operation share an age, so errors tend to appear in the same region rather than uniformly. A region that shows several errors while its neighbours show none is describing its own history.

What error correction hides

Where the flash has error correction, single-bit errors are corrected transparently on read. That is good for a running product and awkward for a recovery: the image comes out clean, the error is invisible in the data, and the only evidence is a counter or a status flag that most reads do not report.

Two practical consequences follow.

First, a clean read is not proof that the array is healthy. It is proof that every error present was within the correction capability at the time of reading.

Second, where a tool can report corrected-error counts per region, that report is more valuable than the image itself for judging whether a part is marginal. A part with a handful of corrected errors in one block is telling you something about that block.

reading corrected errors interpretation
content matches expectation none healthy, or errors below threshold
content matches expectation several, clustered aging in that region; flag it
content differs from expectation — beyond correction either aging or a bad read; distinguish by re-reading
content is all erased values — erased, or never programmed

Reading a part that has been hot

The approach that produces a defensible answer:

  1. Read the whole array twice with the same tool and compare. Identical results on both passes rule out a transient read fault, which is otherwise the first suspicion.
  2. Read in smaller blocks than usual. A block-level read that succeeds everywhere tells you the interface is reliable at that granularity, which removes one variable.
  3. Where error counts are available, collect them per block and keep them in the report. They describe the array’s condition, not just its contents.
  4. Compare against the expected image if the customer has one. Differences that are single bits, scattered, and inside one block are aging; differences that are whole words or whole pages are something else.
  5. Where differences are single bits, do not silently correct them. Report the addresses.

Step five matters for the same reason as step three in the previous section. A report that quietly repairs an aged image produces a customer who reflashes it into a new part and cannot understand why the checksum disagrees with their build records.

The grade is the manufacturer’s answer to the same question

The temperature digit in the ordering code is the manufacturer’s statement about which retention curve it is willing to guarantee. A part ordered for the wider range has been characterised and documented over that range; a part ordered for the narrower one has not, and there is no implication that it would fail — only that nobody has promised.

For a recovery this affects two sentences in the report: what the part was, and what a replacement should be. It does not change the read.

What the deliverable contains

The return set is the code flash image, the data flash as a separate file, the configuration words, the identification words as read, a disassembly with the vector table resolved, and — where applicable — a block-level map of corrected error counts and any single-bit differences from an expected image.

That map is the item that distinguishes a report produced by somebody who has seen aged parts from one produced by somebody who has not. It costs a few minutes and it prevents a customer from treating a marginal part as a good reference.

The grade that determines which retention curve was promised is covered in R7FA2L1AB2DFP data recovery. The per-device identifier that survives aging better than the program does is in R7FA2L1A92DFP heximal recovery, and the ordering code as a whole in R7FA2L1AB3CFP software extraction.

FAQ

Does a warm part read differently? The read is deterministic. Aging changes the stored charge, so the same cell returns the same wrong value until it is rewritten.

Can retention loss be repaired? The bits can be rewritten, but only if the correct value is known from another source. The charge cannot be restored without erasing and reprogramming.

Is a clean read proof the part is good? No. It is proof that any errors present were correctable at the time of reading.

Conclusion

Heat ages a stored image quietly, and the result is a scattering of single bits rather than an obvious failure. Two passes with the same tool rule out a transient fault; per-block error counts describe the array’s condition; and single-bit differences from an expected image belong in the report as addresses, not as silent repairs. The temperature digit tells you which curve the manufacturer signed, which is the only part of this that was ever guaranteed.

PostHeaderIcon R7FA2L1AB2DFM: Getting In Without the Debug Port

There is firmware inside this microcontroller that was not written by the customer. It lives in a protected region, it runs before any application code, and it exists to accept programming commands over a serial pair.

On a dense board where the debug pins were reclaimed for I/O, that firmware is often the only route in. It is worth understanding precisely what it offers, because the common expectation — that anything able to talk to the part can also extract from it — is wrong.

How boot mode is entered

One pin is sampled while reset is asserted. At the level that starts the application, the part runs the customer’s firmware. At the other level, control goes to the boot firmware instead, and the part waits on a serial pair for commands.

condition at reset what runs what the port does
mode pin at run level the application in flash whatever the firmware configured
mode pin at boot level boot firmware in protected ROM serial command protocol

Three practical points follow, and each of them trips people up:

  1. The pin is sampled at reset, not read continuously. Holding it afterwards does nothing.
  2. The serial pair used by the boot firmware is fixed by the silicon, not chosen by the application. It may not be the pair the board uses for its own communication.
  3. If the board ties the mode pin permanently to the run level, the route does not exist regardless of what the part can do.

What the boot firmware will do

The command set is small and oriented towards production programming rather than investigation:

command class what it does useful for a recovery
inquiry reports device identity, firmware version, memory region layout yes, as confirmation
erase erases a block or the whole array destructive only
blank check reports whether a region is erased yes, as evidence
program writes supplied data to a region no, it is a write
checksum returns a checksum over a region yes, as a weak integrity check
jump transfers control to the application no

The second column is what the protocol does. The third column is what matters commercially, and the answer for the one command everybody wants — read this region out — is that there is no such command.

Why a successful connection is not a read

This is the point worth being blunt about. A boot firmware that can erase and program can also, in principle, be used to prove things about the array: a blank check says whether a region is erased, a checksum says whether it matches a known value. Neither of those returns the contents.

So a bench that reports «the boot mode connects, the part is not locked» is reporting something true and not useful. The part was never inaccessible through that route in the first place: boot mode access is granted by a pin level, not by a password. What the customer needs is the array contents, and the protocol does not have a command for that.

question asked answerable from boot mode
is the part alive yes
is this the right part yes
is the array blank yes
does the array match a known checksum yes
what is in the array no

The last row is the whole job, which is why boot mode is a diagnostic tool rather than a recovery tool.

When it is still the right tool

Three situations where the route earns its place:

  • Confirming the part is functional before spending money. A part that answers an inquiry is a part with a working core, working ROM and working serial. That rules out a large class of hardware failures.
  • Restoring a known image. Where the customer has their own firmware and only needs the unit working again, programming through boot mode is exactly the right operation and it costs nothing.
  • Testing the protection state. A part that refuses to erase a region that the boot firmware should be able to erase is telling you that the access window is set over that region. That is evidence, obtained without the debug port.

The third one is the useful one for a recovery that will end at the silicon. Knowing that the access window is set, and over which addresses, tells you what the protection configuration looks like before anything is opened.

What the array looks like from outside

One consequence of the checksum command is worth mentioning because it is occasionally useful. Where a customer has a second, working unit, the checksum over a region of the failed unit can be compared against the working one. Equal checksums do not prove equal contents, but different checksums prove different contents, and that distinction sometimes settles whether the failed unit was ever updated.

That is a weak tool and an honest one. It should be described as such in a report rather than promoted into a verification claim.

What the deliverable contains

Where the job proceeds to a read, the return set is the code flash image, the data flash separately, the configuration words, the identification words as read, a disassembly with the vector table resolved, and a note recording what the boot path reported before the read.

That note is not padding. The inquiry response, the blank check results and the region checksums are all evidence about the state of the part as it arrived, and where they exist they are cheaper and more reliable than anything reconstructed later.

The handshake that gates the debug port but not this route is covered in R7FA2L1AB2DFN locked program recovery. The board-level question of whether the route even exists on a given design is in R7FA2L1AB3CFL heximal recovery, and what a finished report should verify in R7FA2L1A92DNE program recovery.

FAQ

Can boot mode read the flash out? No. The command set covers inquiry, erase, blank check, program, checksum and jump. There is no read command.

Is boot mode protected by the identification words? That is a device-state question and it must be tested rather than assumed. The mode pin gates entry; the identification words gate the debug session.

If boot mode refuses an erase, is the part locked? It means the access window covers the region. That is a configuration state, and it says nothing about whether the contents can be recovered.

Conclusion

The serial boot path is a genuine second door and it is not a shortcut. It confirms that the part is alive, tells you what the protection configuration covers, and lets you write an image you already have. What it does not do is return the contents of the array, and a job that needs those is a debug-port job or a silicon job regardless of how easily boot mode connects.

PostHeaderIcon Break MCU PIC12CE674 Software: Comparison Is Not Verification

When a file is delivered, three questions can be asked of it. Is it the same as what was read. Does it produce a device that behaves like the original. Does it produce a device that meets the product’s specification. The first is easy, the second is harder, and the third is the only one the customer actually cares about.

On a flash part, the second question has a cheap answer: program a blank device and run it. On an OTP part there is no blank device, so the answer has to be built differently — and a delivery that stops at the first question leaves the second and third entirely to chance.

The PIC12CE674 is an eight-pin OTP part with two thousand words of program memory and sixteen bytes of data EEPROM over an external two-wire interface. Two thousand words is enough for a real application: a control loop, a display or a small protocol, plus the constants that define how it behaves.

Why a read-back comparison is weak evidence

What is compared What the comparison proves What it cannot see
file against file the two files are identical whether either is correct
device against file programming succeeded configuration, calibration, timing
device behaviour against behaviour the product works whether it meets specification
device behaviour against a test spec the product is conforming nothing, if the spec is complete

The second row is the one that misleads. On a part where the configuration word is set by the programmer rather than taken from the file, a device can pass a full read-back comparison of the program array and fail to run, because the configuration was never written.

The gap is widest on three items that a file comparison cannot reach: the oscillator calibration value, the configuration word, and the EEPROM’s initial contents. All three are invisible to a comparison of the program array, and all three change behaviour.

The substitute-device route

Because there is no blank OTP part to test with, the practical way to answer the second question is to use an equivalent device that can be programmed and reprogrammed.

Three options exist, in decreasing order of fidelity.

A flash-based equivalent in the same family. If a flash member exists with the same core, the same instruction set and a compatible pinout, programming it with the recovered image and running it in the product is a strong test — with the caveat that peripheral behaviour may differ slightly and the test proves code correctness rather than die equivalence.

An in-circuit emulator or a debug-capable variant. Where the family supports one, running the image under a debugger gives more information than running it in a product, because the state at a failure is visible.

A behavioural model. For a small image, rewriting an equivalent in a modern part is feasible, and it is the route a customer usually takes when the original part is obsolete. It is not verification of the recovered image, it is a port, and the two should not be confused.

Each option answers a different question, and the delivery should say which was used.

What to test, and in what order

Four tests cover the behaviour of a small embedded product, in increasing order of effort.

Start-up. Power the device and observe every output for the first second. A product that drives its outputs in a defined sequence is executing its initialisation; one that leaves them floating is not. This test catches a missing configuration word and a missing calibration value more often than any other.

The primary function. Whatever the product does — measure, time, switch, display — exercise it once. On a device with one input and one output, this is a minute’s work.

The timing. Measure the period of any repetitive output and compare against the original. On a part with an internal oscillator, this is the test that detects a calibration value that was not carried across, and it detects it as a small percentage error rather than a failure.

The stored data. Read the EEPROM through the external interface and compare against the original sixteen bytes. This is the only test that confirms the data block was programmed, and it is trivial on this family because the interface is external.

Test Catches Cost
start-up output sequence missing configuration, missing calibration seconds
primary function code faults, wrong table entries minutes
output timing calibration error, oscillator mismatch minutes
EEPROM read-back unprogrammed data block seconds

What “verified” should mean in the report

The word should be attached to a specific statement, not used as a general assurance. Three formulations are honest and one is not.

“File verified by read-back against the device” — the first question, answered.

“Image executed on a flash equivalent; start-up sequence and primary function matched the original” — the second question, answered for those two tests.

“Output timing measured at 1.02 times the original, consistent with an untrimmed oscillator” — a specific defect found by verification and reported as a defect.

“Fully verified” — a claim without content, and the one that leads to disputes.

Why the original unit cannot be the test bed

There is a tempting shortcut: leave the source unit in place, change one output, and see whether the behaviour changes as the recovered image predicts. It answers a question about the image without consuming anything.

It also answers it badly, for three reasons.

The source unit has its own EEPROM contents, and those contents may be the reason it behaves as it does. A test that leaves them in place tests the pair, not the image.

The source unit’s protection state is whatever it is, and on a part where the array reads normally there is no way to know whether the read was complete or partial without a second source of truth.

And the source unit is the only evidence. A test that damages it — an accidental write, a supply fault during the probe — removes the baseline against which everything else is measured.

Using a flash equivalent avoids all three: it can be reprogrammed, its EEPROM can be set to known values, and losing it costs a part rather than the reference.

Delivering with the verification attached

The image, the configuration decoded, the sixteen bytes raw, the note on the analogue or timing constants that define the product’s behaviour, and the verification statement with its specific tests listed.

For a customer continuing production, the last item is what they will rely on when their own test station finds a difference. A report that states what was tested and what was not allows that difference to be diagnosed; a report that claims full verification converts it into an argument.

Where the sixteen bytes are discussed as a security question rather than a verification one, PIC12CE673 flash covers the external interface. Where an eight-pin part’s entire verification problem is the interface rather than the behaviour, PIC12C509A binary sets out the constraints. And where the verification has to scale to a production run, PIC16F877 program covers that process.

The short version

A comparison proves equality, not function. With no blank OTP part to test with, verify on a flash equivalent and be specific about which behaviours were checked. State the verification in the report as a list of tests, never as an adjective.