TMS320F280230: A Small Part Where the Boot ROM Does the Work
Thirty-two kilobytes is not much room. Firmware for a part this size is usually written to be small, and a common way to make it small is to lean on what the silicon already provides. That is where the boot ROM becomes interesting: it contains the flash programming routines, the serial loading protocol, and a table of functions that application code can call instead of implementing.
For recovery, this has a consequence that surprises people. The image in the flash is not the whole program, and the missing part is not secret — it is in the boot ROM, identical on every device of the same revision, and documented.
What lives in the boot ROM
On a part in this family the ROM holds:
- the reset vector and the initial boot decision (which interface to load from);
- the SCI, SPI, I2C and CAN loading protocols;
- the flash programming API, callable from application code;
- a set of mathematical and utility routines;
- version and part identification constants.
An application that calls the ROM’s flash routines is smaller than one that implements them, and the call is a branch to a fixed address. In a disassembly, such a call is indistinguishable from a call to a function that happens to live at a low address — and this is exactly how a reader mistakes ROM calls for missing code.
| Region | Contents | In a flash image |
|---|---|---|
| Boot ROM | Loaders, flash API, part ID | Absent, identical on all parts |
| Flash | Application code, tables | Present |
| OTP | Security configuration, calibration | Present where readable |
| RAM | Runtime state | Absent by nature |
Why a small image looks incomplete
Reading 32K of flash from a device whose application is 20K produces a 20K image and 12K of erased flash. There is nothing wrong with this, and yet it produces two recurring misreadings:
“The image is truncated.” It is not. The rest of the array was never programmed.
“Calls to low addresses are unresolved.” They are calls into the ROM, which is a different address range and is not part of the image.
The second misreading is worth knowing because it produces long detours. A disassembler will happily label a branch to 0x3Fxxxx as a call to an unknown function, and a reader who does not know the ROM map will spend time trying to find code that was never in the flash.
The boot decision is data, not code
Which interface the part loads from after reset is decided by pins, by the state of a few flash locations, and by the ROM’s logic. On a production device those inputs are fixed by the board and by the programmed configuration.
This is the part of the behaviour that a flash image cannot explain. A device that refuses to run its own code is often a device whose boot configuration points at a loading interface that is not present on the board — a production mistake that reads like a firmware fault.
The check is cheap: after reset, does the part execute from flash, or does it sit waiting on a serial interface? A device waiting on an interface has its peripherals configured by the ROM, not by the application, and the reset-state register values differ.
What “locked” means at this size
The security module is the same design as on the larger parts: a password at the top of flash, a comparator on the read path, zeros for protected reads.
The difference is scale. With 32K of flash the password sector is a meaningful fraction of the array, and the cost of a mass erase — losing the program — is not offset by a large remaining region. On a small part, a lock is close to a total loss, which is why production processes for parts this size tend to keep the password recorded.
There is also a practical asymmetry: a 32K image is small enough that reconstruction from behaviour is often feasible. Where a 512K image would be an unreasonable inference exercise, a 20K application with a handful of control loops can sometimes be characterised thoroughly enough to rebuild.
Recovering firmware from a constrained device
The order that works when the array cannot be read:
- Establish what the device does. Inputs, outputs, timing, communications. A small part usually has a small, well-defined job.
- Identify the ROM calls. The boot ROM’s function table is fixed per revision, so a branch into the ROM identifies which routine is being used — and that tells you what the firmware is doing at that point.
- Recover the configuration from the board. Clock source, pin assignment, communication parameters. On a small design this is deducible from the schematic and measurement.
- Reconstruct, then compare behaviour. A rebuilt application that responds identically at every observable point is a functional recovery.
Step two is the one specific to this family and the one most often missed. Because the ROM is documented, a branch into it is information rather than a gap.
The trim question
Small parts with analog blocks carry factory trim, and on this size of device the trim is often applied by the ROM at startup rather than by the application. That is good news for recovery: the trim is not part of the image, and a rebuilt application inherits it automatically.
It is bad news for copying. A duplicate part carries its own trim, which is close but not identical, and an application that assumed a specific offset will read slightly differently on the copy. On a control application this shows up as a small, consistent error — the kind that gets blamed on the code.
Related reading
- TMS320F28067 and the lock at the read path — the same mechanism on a larger array.
- TMS320F241 and the production programming path — how these parts are loaded at manufacture.
- TMS320F28234 and decoding an image — turning a recovered image into an understanding.
FAQ
Is the boot ROM part of the firmware image? No. It is on-die, identical across parts of the same revision, and never appears in a flash read.
Why do calls in a small image point outside it? They call the ROM’s function table. That is normal on this family and is how small firmware stays small.
Can a 32K device be reconstructed from behaviour? More often than a large one, because the application is correspondingly small and its interfaces are few.
Does mass erase destroy the trim? No. Trim lives outside the program array.
Why does a duplicate measure slightly differently? Each die carries its own analog trim. Code that assumed one device’s offset reads slightly off on another.
Conclusion
On the F280230 the interesting part of the system is not in the flash. The boot ROM supplies the loaders, the flash routines and the trim, and understanding that turns an apparently incomplete image into an accurate one. For recovery, the small array is an advantage: fewer interfaces, a documented ROM, and a scope for reconstruction that a larger device does not offer.