Posts Tagged ‘mcu recoverying embedded program’
Recover MCU R5F562TAADFH EEPROM: Reading a Board That Will Not Boot
A dead product is a different engagement from a working one, and the difference is not technical difficulty. It is sequence. On a working board the data can be read in ten minutes; on a board that does not start, the first hour is spent establishing why, because the processor may not be the reason and the data may be reachable without touching it at all.
The commercial point follows from that. A customer with a dead unit usually needs the data — accumulated run hours, a parameter set, a calibration table, an event log — and usually assumes the only route is to remove the processor. Half the time it is not, and the difference is worth several hundred pounds and a week.
R5F562TAADFH#V3 is one of the larger-memory order codes in the RX62T group, in a QFP-type package field. Its peripheral set makes it a motor-control part, which is what makes the data valuable: a drive that has been in service for years holds a record of how it has been used.
Four fault classes, four prospects
| class | symptom | is the data reachable |
|---|---|---|
| no power | nothing on any rail | not until the supply is understood |
| power, no clock | rails correct, no activity | often yes, through boot mode |
| power and clock, no bus activity | processor alive, no external traffic | usually yes, through the programming interface |
| everything running, no output | the processor works, the application does not | yes, and the fault is probably not the processor |
The fourth row is the one that arrives mislabelled most often. A unit whose display is blank and whose outputs are dead may have a working processor running code that has decided not to start the application — a checksum failure on a parameter block, a variant selection that reads a missing jumper, a watchdog that never gets serviced. In that case the data is not merely reachable; it is the evidence for the diagnosis.
The order of operations
Power first, because everything else is speculation without it. Measure the rails, not the nominal voltages but the actual ones, and check for a rail that is present at the wrong level rather than absent. A processor fed at the edge of its range will sometimes start and sometimes not, which produces a “dead” unit that works on the bench.
Clock second. On this group the processor can run from an on-chip oscillator, so a dead crystal is not necessarily a dead processor — but a design that selected the external source will not start without it. Checking whether the clock is present, and whether the firmware’s startup sequence waits for it, separates two failure classes that look identical from the outside.
Bus third. A working processor drives its pins. No activity on any bus means either the code is not running or the code is running and waiting, and the difference is visible in a few seconds with a scope on the right pin.
Read fourth. Once the processor is known to be alive, the reading route is the ordinary one.
Boot mode is the useful property here
The programming interface runs from a routine that does not depend on the board’s clock. That single fact is why a board with a dead oscillator can still be read: the processor enters boot mode, the routine runs from its own timing source, and the flash is accessible over two wires.
It is worth testing on every dead board before anything is removed. Two pins, ground and a serial adapter, and the answer arrives in under a minute — either the device answers the handshake or it does not, and both answers are informative.
If it answers, the data is extracted without touching the assembly. If it does not, the next question is whether the mode pin is reachable, because a design that strapped it has converted a simple job into a removal.
When to abandon the board
Three conditions make removal the right answer rather than the last resort.
The processor does not answer in boot mode and the mode pin is not reachable for strapping.
The board is damaged in a way that risks the processor — a shorted rail, a failed regulator that has put the supply above specification, evidence of thermal damage near the device.
Or the customer needs the assembly returned working, which means the processor has to come off anyway for the fault to be found.
In the third case the recovery and the repair are the same operation and should be quoted as one, which is a conversation worth having before the work rather than after.
What changes when the cargo is data
Three things, compared with a firmware recovery.
Volume. Data is small — a few blocks at most — which means the read is quick and the analysis is where the time goes.
Verification. A code image can be verified structurally, by vectors and by disassembly. A data block has no such structure, so verification is against the customer’s expectations: a known parameter range, a run-hour counter that must be monotonically increasing, a serial number that must match the label.
And urgency. A dead production machine is a stoppage, and the schedule matters more than the elegance of the method. That is a reason to attempt the cheap routes first and to say so.
For the location of the data once the device is readable, R5F562T7ADFF EEPROM covers the markers. For the log format that makes an event history readable, R5F562TABDFF EEPROM takes it apart. And for the programming interface that a dead board can still answer on, R5F562T6EDFF program covers boot mode in detail.
FAQ
Can a dead board be read without removing the processor? Often, through the boot-mode interface, which does not need the board’s clock or the application to run.
What if the processor itself is damaged? Then the die is the only route, and on a part this size that is a die-level engagement rather than a board-level one.
Is the data still valid if the board died mid-write? The last record may be torn. The log structure means the previous values are intact, which is one of the reasons emulated stores are worth reading carefully rather than quickly.
The short version
On a dead board, find out what is dead before deciding what to remove. Check power, then clock, then bus, then read. Boot mode does not need the board’s clock, which is why it answers on units that look hopeless. And when the cargo is data rather than code, verification comes from the customer’s expectations, so ask for the ranges and the labels before the read rather than after.