TMS320F28068F: When Part of the Program Is Not in the Flash
A flash read is normally a complete description of a device’s firmware. On the F28068F that is not true, and the exception is not a corner case — it is a design feature that the part exists to provide. Alongside the C28x core sits a second processor with a separate program memory, and firmware that uses it puts real logic there.
The consequence for anyone reading this device is specific and easy to miss: the image obtained from flash is complete in the sense that it is everything in the array, and incomplete in the sense that it is not everything the product does. A copy made from that image boots, initialises, and then computes the wrong numbers.
Two processors, two address spaces
The control law accelerator is not a co-processor bolted onto the C28x pipeline. It has its own program counter, its own registers, its own instruction set — a small floating-point-oriented one — and its own memory. Its program is loaded into a dedicated RAM block, and it executes from there.
That last property is the important one. The accelerator does not execute from flash. Its code has to be copied into its RAM at startup, normally by the C28x during initialisation, and then the accelerator is started.
So the flash image contains the source of the accelerator’s code as data, and the accelerator’s code as executed exists in RAM. Both are needed for a faithful copy, and they are in different places.
| Where the code is | How it gets there | Does a flash read capture it |
|---|---|---|
| C28x program | Programmed into flash | Yes |
| Accelerator program | Copied from flash to accelerator RAM at boot | Yes, as data |
| Accelerator program written at runtime | Computed or received, then loaded | No |
| Accelerator data tables | Copied from flash | Yes, as data |
Why the third row exists
The pattern that defeats a flash read is firmware that generates or receives accelerator code rather than storing it. It is less exotic than it sounds: a control loop whose coefficients are computed from a calibration step, or a field-updatable algorithm delivered over CAN, both produce accelerator code that never exists in the flash array at all.
On such a device the flash image contains the loader and the coefficients, not the loop. A copy runs fine and controls nothing.
What the accelerator changes about protection
The security module protects the main array and the RAM blocks assigned to it. The accelerator’s memory is RAM, and RAM protection on this family is a separate question from flash protection — the same module governs it, but the configuration bits differ, and the RAM allocation is per zone rather than per sector.
This produces an asymmetry worth knowing: a device can be configured so that the flash is readable and the accelerator’s RAM is not. In that state, a straightforward read returns the array and misses the running code entirely — and nothing in the read reports a gap.
Detecting that a device uses the accelerator
Before worrying about copying it, establish whether it is there. Several signals, any of which is sufficient:
- The initialisation sequence writes to the accelerator’s control registers. Their addresses are fixed and recognisable in a disassembly of the boot code.
- The boot code contains a block copy to a RAM range that is not used for data — a
memcpywhose destination is executed from shortly afterwards. - The interrupt map routes a task to the accelerator rather than to a C28x interrupt service routine.
- Behaviour: a control loop whose period is far shorter than the C28x could sustain alone.
The third signal is the most reliable from behaviour alone, and it is visible without any read at all — a device whose fastest control loop runs at a period the main core could not meet is using the accelerator, whatever its flash says.
Reading order that accounts for both
The sequence that produces a complete picture:
- Read the flash array. This gives the C28x image and, as data, the accelerator’s program if it is stored as a blob.
- Read the accelerator’s RAM if the memory protection configuration permits it. This gives the code as it exists at runtime, which is authoritative.
- Compare the two. If they match, the blob is the code and the copy is straightforward. If they differ, the runtime version is generated and the generation logic is the thing to understand.
- Capture the accelerator’s initial data as well — its coefficient tables are usually in its own RAM and are as important as its instructions.
Step two is the one people skip. It requires the memory protection state to permit a read, and on a locked part it will not. But on a part where the flash is open and the RAM is not, the flash read alone is a trap: it produces a plausible, complete-looking image that reproduces nothing.
Configuration that is separate from code
Beyond the two programs, three items decide whether the copy behaves identically:
- The accelerator’s start-up sequence. The order of “load, configure, release from reset” is not optional, and altering it produces a device that starts the loop before its coefficients are in place.
- The interrupt mapping. Moving a task between cores changes the timing and the shared-data protocol.
- The shared RAM convention. The two cores communicate through a defined region; a copy that puts the region elsewhere works until the first handshake.
None of these live in the program image in a form that a disassembly hands you. They live in the initialisation code, which is why initialisation deserves to be read first when the goal is a working replica rather than a faithful file.
Limits
If the accelerator’s memory is read-protected and the flash is not, the missing piece is the running code and there is no register sequence that produces it. What remains is the flash blob — which may be the code, or may be the recipe for the code.
Determining which of those two you have is a short experiment: load the blob into a known-good part, run it, and compare the output against the original device. If the outputs match, the blob was the code. If the copy runs and produces a constant, the blob was a recipe and the calibration steps that complete it were never in the array.
Related reading
- TMS320F28075 and zone-based memory protection — how RAM and flash are assigned to zones.
- TMS320F2806 and file representations — why the format of the captured blob matters.
- TMS320F2812 and code outside the device — the other way a program can live somewhere the array is not.
FAQ
Does the accelerator execute from flash? No. Its program is copied into its own RAM and runs from there.
Can a flash read capture accelerator code? Only if that code is stored in flash as data and copied at boot. Generated or downloaded code is not in the array.
Is the accelerator’s memory covered by flash protection? It is RAM, governed by the same security module but configured separately. The two states can differ.
How can I tell the accelerator is in use without reading memory? From timing. A control loop faster than the main core could service indicates offloaded code.
What breaks first in a copy made from flash alone? The control loop: it starts and produces output that does not match the original.
Conclusion
On the F28068F, “the firmware” is distributed across two processors with two memories and two loading mechanisms. A flash read captures one of them and the recipe for the other. Recognising that split before starting the copy is the difference between a replica that controls a motor and one that reports zero.
Break DSP TMS320F28068 MCU Secured Flash Memory
Break DSP TMS320F28068 MCU Secured Flash Memory and make tms320f28068 microcontroller clone by copy embedded binary file to new microprocessor;
The solution is to use the Wait boot option. This will sit in a loop around a software breakpoint to allow a debug probe to be connected without tripping security. These devices do not support a hardware wait-in- reset mode.

zlomit DSP šifrované TMS320F28068 MCU zabezpečenou flash paměť a vytvořit klon uzamčeného mikrokontroléru TMS320F28068 sjednocený zkopírováním vloženého binárního souboru nebo heximálních dat do nového mikroprocesoru TMS320F28068;
When the code-security passwords are programmed, all addresses from 0x3F 7F80 to 0x3F 7FF5 cannot be used as program code or data when . These locations must be programmed to 0x0000.
If the code security feature is not used, addresses 0x3F 7F80 to 0x3F 7FEF may be used for code or data. Addresses 0x3F 7FF0 to 0x3F 7FF5 are reserved for data and should not contain program code when break dsp mcu tms320f240 locked flash memory.

razbiti DSP šifriranu TMS320F28068 MCU osiguranu flash memoriju i napraviti TMS320F28068 zaključani klon mikrokontrolera ujedinjen kopiranjem ugrađene binarne datoteke ili heksimalnih podataka na novi TMS320F28068 mikroprocesor;
The 128-bit password (at 0x3F 7FF8 to 0x3F 7FFF) must not be programmed to zeros. Doing so would permanently lock the device.
TMS320F2811: Sector Protection, and Why Complete Images Are Rare
Two protections on one array is a common arrangement, and they are usually discussed as if they were one thing. On this family they answer different questions and are configured in different places: one decides whether you may read what is there, the other decides whether you may change it. A device can be open for reading and closed for writing, or closed for reading and open for writing, and both states are common in shipped products.
The reason this matters for recovery is that the second gate leaves a permanent mark. A device whose boot sectors were write-protected during production carries an image whose low addresses and high addresses have different histories, and the seams show.
The two gates
The password gates reads. Without it, the array returns data. With it, reads from outside the secure region return zeros.
The per-sector write-protect bits gate erases and programs. They are separate bits, one per sector, held in a structure that is itself covered by the password. A sector that is write-protected cannot be erased through the normal command sequence; the flash controller rejects the operation.
| State | Reads | Erases | Typical product |
|---|---|---|---|
| Open / open | Yes | Yes | Development, unlocked production |
| Open / protected | Yes | Sector by sector | Field units with a fixed boot region |
| Locked / protected | No | No | Shipped product with a secure bootloader |
| Locked / open | No | Yes, by mass erase | Product expecting field reflash |
The fourth row is the awkward one. A part that is read-locked but not write-protected can be mass-erased, which destroys the image but returns a working part. That is the recovery path for the part, not for the program.
Where the seams come from
Consider a device whose boot sector was written once and then write-protected, while the application sector was left open for field updates. It has been through six updates. The application sector contains the current build; the boot sector contains the original.
Now read it. The image is internally inconsistent: the boot code expects an application interface that two revisions of the application no longer provide, or expects a version string that no longer matches. The disassembly contradicts itself at the boundary between the sectors.
This is not corruption. It is an accurate picture of a device whose two halves aged differently, and it is far more common than a pristine factory image.
Recovering something useful from a partial image
Three properties of the array make partial recovery practical:
Sectors are large and few. On this family a sector holds several kilobytes. A protected or unreadable sector therefore removes a large contiguous block, not a scatter of bytes. What remains is still contiguous and still disassemblable.
The boot sector is small and has a known shape. Its entry point, its vector table and its initialisation sequence are recognisable. Even a fragment of it is informative.
Code and data have different textures. Code sections disassemble cleanly; constant tables do not. A sector that will not decode as instructions is probably a table, and its role can be inferred from what indexes it.
What a recovered binary is
A recovered binary from a partially readable device is a file with holes. Two decisions apply to every hole:
- Represent it as absent, so that anything loading the file cannot mistake zeros for content.
- Represent it as zeros, so that the file is a valid image of the full address range.
The first is correct for analysis, the second for comparison against a known build. Using the second while analysing is how people conclude that a device contains large blocks of zeroed code that were never there.
Timing and voltage during the read
On this family the flash controller has a documented access time requirement that depends on clock frequency, and the clock is configured by the very firmware being read. A part read at the wrong assumed frequency returns data with occasional bit errors that are not reproducible at a different rate.
The practical rule: read the same region twice at two different speeds. Data that is identical in both is data. Data that differs is a sampling problem, and the slower read is the more likely truth. This costs one extra pass and eliminates an entire class of false findings — including the misleading one where a single flipped bit looks like a deliberate patch in the code.
The password, revisited
For completeness: the recovery of the array and the recovery of the password are separate objectives, and only the first is a reading problem.
If the password is known, the array is open and the per-sector bits are readable, which tells you exactly which sectors were protected during the device’s life. That history is often more valuable than the code: a sector that was write-protected at production and never changed identifies the part of the firmware that the vendor considered fixed.
If the password is not known, the array is closed and the write-protect bits are equally invisible. Then the analysis has to proceed from behaviour, and the seams described above are not available because there is no image to have seams in.
Assembling a working picture
The sequence that produces a usable result rather than a plausible file:
- Establish the clock configuration from the boot code, then read at the correct rate.
- Read the whole address range twice; discard values that do not agree.
- Map the holes. A hole at a sector boundary is protection; a hole in the middle of a sector is a read failure.
- Record the sector map with the image. Without it, the next person reads the file as a complete device.
- Reconstruct the configuration separately — clock, boot mode, peripheral muxing — because none of it is in the array in a form a disassembly reveals.
Step four is the discipline that makes the work reusable. A binary delivered without its sector map invites someone, eventually, to program it into a part and wonder why the device boots once and then stops.
Related reading
- TMS320F2809 and the unlock sequence — how the read gate is released in the first place.
- TMS320F2812 and program outside the array — when the recovered image is not the whole design.
- TMS320F2806 and file representation — how to record a holed image without corrupting it.
FAQ
Can a write-protected sector be erased? Not individually through the normal command sequence. A mass erase clears everything, including the protection.
Does write protection hide the sector’s contents? No. It is an independent gate; a part can be readable and write-protected at once.
Why do recovered images have holes at sector boundaries? Because the hole is the granularity of protection. Protection is granted per sector, not per byte.
Are bit errors in a read always damage? No. Reading at the wrong clock rate produces them. Re-read slowly before concluding anything.
Is the sector map part of the image? It is not in the image, and it must be recorded alongside it, or the file will be misread later.
Conclusion
Recovery on the F2811 is a map-making exercise as much as a reading one. Two gates, sector granularity and a clock that depends on the code being read all conspire to make a naive read incomplete and undiscoverably wrong. Reading twice, recording the holes and separating configuration from code turns a plausible file into a usable one.
TMS320F243: When the Peripheral Set Decides What a Firmware Image Means
Parts in a family share a core, an instruction set and a security model, and differ in what surrounds the core. That difference is usually treated as a selection detail — this one has more timers, that one has a different package. For firmware analysis it is the opposite of a detail: the peripheral set is the vocabulary in which the code is written.
The F243 is the case in point. Its array and protection work like the F241’s. Its firmware does not look anything like the F241’s, because the peripherals it drives are different, and the addresses it touches are different in ways a disassembly shows immediately.
The package tells you less than you think
A package code names a pin count and a thermal characteristic. It does not name the memory size, the peripheral mix, or the revision. Reading a part number as a specification is how two devices end up treated as interchangeable when they are not.
On a device being analysed after the fact, the reliable statements are the ones measured: which pins carry activity, which peripheral registers are written at startup, and what the resulting outputs look like. Everything else is inference from a marking that may not even be the original.
| Evidence | What it reliably tells you |
|---|---|
| Pin activity during operation | Which peripherals the design uses |
| Startup register writes | Which peripherals the firmware configures |
| Package marking | Claimed part number; verify, do not assume |
| Die marking after decapsulation | Actual silicon revision |
Peripheral differences change the code, not just the wiring
Consider what a firmware image consists of. Most of it, in volume terms, is peripheral handling: setting up timers, servicing conversions, formatting communications, sequencing outputs. Change the peripheral set and that majority changes, even though the core is identical and the algorithm is the same.
That has a practical consequence for comparison. Two images from two parts in the same family will not resemble each other, and their dissimilarity says nothing about whether they implement the same function. Comparing them at the level of instruction sequences is meaningless; comparing them at the level of observable behaviour is the only comparison that holds.
What “secured” means in a service context
These devices were programmed on production lines, and the password was set by whatever tool did the programming. In the years since, the tool, the record of the password, and often the vendor have gone.
So the realistic starting position is: the device is locked, the password is unknown, and there is no organisation left to ask. That is a different problem from a device locked by a deliberate security decision, and it deserves a different response — often the practical answer is a functional replacement rather than an extraction.
The distinction matters because it changes what counts as success. Recovering a 1990s motor controller’s exact image is rarely necessary. Restoring the machine it drives is.
Analysing a device whose array you cannot read
The method that works on this generation, in order:
- Map the board. Which pins of the device go where. This is measurable and requires no access to memory.
- Characterise the inputs and outputs. For a control device: what it senses, what it drives, with what timing and resolution.
- Identify the control law from response. Step, ramp, load change. The response reveals the structure — proportional, integral, feed-forward, limit behaviour.
- Identify the communication. Protocol, frame rate, message format. A bus capture gives this in minutes.
- Rebuild to the specification. Not to the instruction stream — to the observed behaviour.
The order is deliberate. Each step is cheap and independent, and the first four together produce a specification complete enough to rebuild from, without ever touching the protected region.
Where the security model intrudes
Two places only:
Erase granularity. On this generation the array erases coarsely, so there is no option to clear a small region and leave the rest. Any attempt to remove protection by erasing removes everything.
Read substitution. Protected reads return uniform values, so a partially successful attempt is hard to distinguish from a failed one. Verification requires a known-populated address, and on a device whose contents are unknown, no such address exists in advance.
Everything else about the analysis — the board, the timing, the protocol — proceeds regardless of the lock state, which is why the behavioural route is the productive one on a device this old.
Revisions and why they matter here
Silicon revisions on a part of this age fix errata, and the errata include peripheral behaviour that firmware written for one revision may not tolerate on another. A rebuilt implementation that works on one unit and fails on another is often a revision difference rather than a coding error.
The check is to compare the die marking of a working unit against the marking of a suspect one, or, failing that, to test the specific peripheral behaviour that differs between revisions. This is where decapsulation occasionally earns its cost — not for the array, but for the marking.
Practical summary
- Treat the part number as a claim and the measurements as facts.
- Expect the firmware to be dominated by peripheral handling, and therefore to differ entirely between family members.
- On a locked service device, rebuild to behaviour; the specification is the deliverable.
- Check revision before blaming a rebuild for a difference.
Related reading
- TMS320F241 and the loader path — the sibling part, and the interface both share.
- TMS320F240 and protection as a programming option — the security model in its original form.
- TMS320F28335 and decapsulation as a source of markings — when the die has to be read to identify the silicon.
FAQ
Are the F241 and F243 interchangeable? Only if the design does not use the peripherals that differ. Their firmware, and often their pin behaviour, is not.
Does the lock prevent behavioural analysis? No. Measuring the board, the timing and the protocol requires no access to memory.
Is extraction the normal outcome on devices this old? Rarely. Reconstruction to an observed specification is more common and more useful.
Why do two units behave differently on the same rebuild? Usually a silicon revision difference in peripheral behaviour.
Can the revision be determined without decapsulation? Sometimes, through revision-specific behaviour. Otherwise the die marking is the reliable source.
Conclusion
The F243 differs from its siblings in the part of the firmware that dominates it — the peripherals — so an image from one part says little about the other even when the algorithm is the same. On a locked device of this generation the productive route is specification: board, timing, protocol, response, rebuild. The lock blocks one source of information; it does not block the others.
TMS320F240: Security in a Part Designed Before It Was a Feature
Parts of this generation predate the assumption that every microcontroller has a security module. Flash was a recent addition, the array was modest, and protection was implemented as an option applied during programming rather than as an architectural feature of the memory system. The documentation treats it accordingly: a short section, a few paragraphs, and no state diagram.
That makes the F240 a different kind of problem from a modern part. There is no zone configuration to read, no OTP block to consult, and no field of lock bits to decode. There is a device in some state, and the work begins with establishing which state.
What protection means here
The array can be configured so that reads from an external master return something other than the program. The configuration is applied at programming time, and it lives in the array itself rather than in a separate OTP region.
Two properties follow, and both are useful:
- Erasing removes the protection along with the contents, because both are in the same memory.
- The protected state cannot be told apart from a blank array by reading, because both return the same thing.
The second property is the one that costs time. A device read as all-zeros or all-FFFF might be protected, might be erased, or might have failed. On this generation the only way to distinguish those is through behaviour.
| Observation | Consistent with |
|---|---|
| Boots and runs | Programmed, and the CPU can reach its own code |
| Serial interface active after reset | Boot loader mode, array may be blank |
| No activity at all | Failed, or waiting on a clock that is not present |
| Runs, but reads return uniform values | Protected; execution path differs from data path |
The CPU fetches, the interface reads
The distinction between the instruction fetch path and the data read path is what makes a protected device still functional. The core executes from the array; an external master asking for the same bytes is refused. On this generation the refusal is a substitution, exactly as on later parts, though the mechanism is simpler.
This is why “it does not read” and “it does not work” are separate diagnoses. A device that runs is a device whose array contains valid code, regardless of what a reader sees.
Getting the device into a known state
Before any other work, three things need to be established:
- Power and clock. This generation expects an external clock or a crystal, and a device without its clock does nothing readable. Confirm the oscillator is running before drawing conclusions.
- Boot mode. Pin states at reset select between executing the array and entering a loader. A device held in loader mode looks blank no matter what it contains.
- Reset behaviour. Watch the address lines or the bus, if accessible, during the first few hundred cycles after reset. An array access in the first cycles is direct evidence that code is being fetched.
The second item resolves a surprising number of cases. Boards that strap the boot pins for a production loader, and products whose loader interface was never implemented, produce devices that appear dead and are in fact waiting.
Programming and erasing on this generation
The programming interface is parallel, and it is not the in-circuit serial interface that later parts use. That has two consequences for anyone working on a board:
- Access requires the address and data bus, which usually means removing the device or using a dedicated fixture.
- The erase operation is the whole array, because sector granularity on this generation is coarse.
Coarse granularity changes strategy. On a part where the array erases as a unit, there is no possibility of protecting a boot region and updating the rest — a limitation that also means no partial image can exist. Recovered images from these devices are either whole or absent.
Reconstructing firmware for a part this age
The practical situation with a 1990s motor-control device is usually that the product is still in service, the vendor is gone, and no source exists. In that setting the useful work is not extraction but specification:
- What does the device control, and to what accuracy?
- What is its control law, inferred from its response to step and ramp inputs?
- What are its safety limits, inferred from where it stops?
- What does it communicate, and in what format?
A reconstructed implementation that meets those observations is a valid replacement, and on a device of this generation it is often a better outcome than an exact copy — because the replacement can be written with modern tooling and documented.
Where an exact copy is needed, the route is the array: erase protection by erasing the device, then rebuild from whatever record exists. On a part whose protection and contents share one memory, there is no way to remove one and keep the other.
What to expect
Honest expectations for this part:
- A protected, programmed device will not yield its image electrically.
- A device removed from service is as likely to be erased as programmed.
- The behaviour of a working device is a richer source of information than the state of its array.
- The documentation for the security mechanism is thin, and much of what is known comes from the programming specification rather than the datasheet.
The last point is not a complaint. It is a warning that the datasheet’s silence on a topic should not be read as absence of the feature.
Related reading
- TMS320F243 and how the package changes the analysis — the sibling part with a different peripheral set.
- TMS320F2809 and the modern unlock sequence — what the mechanism became a generation later.
- TMS320F280230 and the boot ROM’s role — where loading logic moved once it left the array.
FAQ
Does erasing the device remove the protection? Yes. On this generation protection lives in the array, so erasing removes both.
Can a protected F240 still execute its program? Yes. The core’s fetch path is permitted; external data reads are not.
Is there sector-level erase? Effectively not. The granularity is coarse, so images are whole or absent.
Why does a device appear blank? Because it is erased, because it is protected, or because it is held in loader mode by its boot pins.
Is the programming interface serial? No. It is a parallel interface, which is why in-circuit work on this generation is limited.
Conclusion
The F240’s protection is a programming-time option in an era before security modules had names. There is no configuration to read and no state diagram to follow, so the work begins with the device: clock, boot mode, and whether it executes. From there, behaviour is the reliable source, and a functional replacement the realistic goal.
TMS320F241: The Loader Path Is Also the Recovery Path
Every device has a way in. On a part of this generation the way in is a boot loader held in ROM, selected by pin states at reset, which accepts a program over a serial interface and writes it into the array. The same routine is used at manufacture, at service, and — with modifications — at recovery.
That makes the loader the natural starting point for any work on the part: it is documented for the silicon, it exists on every device regardless of what the array contains, and it does not depend on the application being intact.
What the loader does
After reset, if the boot pins select loader mode, the ROM initialises the serial port to a fixed configuration and waits. It expects a defined frame format, a defined handshake, and a defined sequence of data records. Once the array is written, the ROM transfers control to the entry point.
Three consequences follow:
- The loader runs before any application code, so it works on a blank device and on a programmed one.
- It is not affected by the array’s protection state, because it writes rather than reads.
- It does not tell you what the array contains. A device in loader mode is a device with an open write port, not a device with readable memory.
| Aspect | Loader | Array read |
|---|---|---|
| Depends on the application | No | Not applicable |
| Affected by read protection | No | Yes |
| Reveals existing contents | No | Yes, unless protected |
| Requires the ROM | Yes | No |
Why the loader is not a read path
The loader’s job is to write. It accepts records addressed into the array and programs them. Nothing in the protocol returns previously stored data, because the manufacture case had no need for it.
This is the point where expectations go wrong. A device that accepts a new program through its loader is not therefore a device from which the old program can be recovered. The loader is a write-only door, and the fact that it opens does not mean anything behind it is visible.
What the loader does provide is a controlled way to change the device’s state. On a part where the array is protected and the goal is a working unit rather than an original image, loading a known program is a complete solution.
Recovering the loading configuration
The loader’s frame format and port settings are fixed but not always recorded. Recovering them from a device that no longer runs requires measuring the interface during an attempted load:
- Reset the device with the boot pins in loader configuration.
- Observe the transmit line. The ROM emits a synchronisation pattern before it expects anything.
- Measure the bit rate from the pattern’s period.
- Match the frame format to the ROM’s documented options.
Step two is the useful one. A device that transmits a synchronisation pattern on reset is a device in loader mode with a working clock and a working port — three facts established in one measurement, none of which require the application to be intact.
Clock and baud, and why they are coupled
The loader derives its bit rate from the device clock, which comes from a crystal or an external oscillator on the board. If the clock is wrong, the loader’s bit rate is wrong, and a host configured for the nominal rate sees framing errors rather than a failed device.
This produces a diagnosis trap. A board whose oscillator is out of specification, or absent, presents a device that appears not to enter loader mode. The device is fine; the timing is wrong. Measure the clock before concluding anything about the port.
What the part’s protection does and does not block
Reading the array from an external master is blocked when protection is applied. Writing through the loader is not, and neither is erasing.
That asymmetry defines the options on a locked unit:
- If a known program exists, the loader writes it and the device is restored. This is the common case in service work: a failed unit is reflashed from a production image.
- If no program exists, the loader gives a working but empty device. To obtain the original program, the array has to be read, and protection stands in the way of exactly that.
The distinction again separates restoring from reading. Neither is better; they answer different questions, and one of them is usually what the person actually needs.
Why this generation’s workflow looks the way it does
Products built around this part were manufactured with a fixture that held the boot pins, drove the serial port and streamed a program. That fixture is also the service tool. A vendor’s field procedure for a failed unit was: put it in the fixture, load the current image, test.
For anyone maintaining such a product now, reconstructing that workflow is often more valuable than recovering any individual device’s firmware. The fixture plus a known-good image restores units indefinitely; a recovered image restores one.
Practical notes
- The loader’s entry configuration is decided by pins, so a board that straps the pins for application boot needs those straps lifted to enter loader mode.
- Loading does not erase the whole array by default on every implementation; a program written over an existing one may leave sectors in a mixed state. Erase first, then load.
- After loading, confirm the entry point executes: the loader transfers control, and a program with a wrong entry address produces a device that appears to do nothing.
Related reading
- TMS320F243 and the same silicon in a different package — how peripheral differences change the analysis.
- TMS320F240 and protection at programming time — the sibling part’s security model.
- TMS320F280230 and the successor ROM — what the loader became on later parts.
FAQ
Can the loader read the existing program? No. It writes. The protocol has no read command.
Does read protection stop the loader? No. It writes and erases; protection governs reads.
How do I know a device is in loader mode? It transmits a synchronisation pattern shortly after reset.
Why does the host see framing errors? The device’s clock is wrong, or absent, so the derived bit rate differs from the nominal one.
Is loading the same as restoring? It restores a device to a known program. It does not recover what was there before.
Conclusion
The boot loader is the part’s most reliable interface: present on every device, independent of the array’s contents and unaffected by read protection. It is a write path, not a read path, and recognising that turns a locked unit into a solvable problem when a program exists and an unsolvable one when it does not — with the fixture, not the device, being the asset worth rebuilding.
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.
TMS320F28375: There Is No Cipher Here to Decrypt
“Decrypt” is the word people reach for, and on this part it describes something that does not exist. There is no algorithm turning plaintext into ciphertext at program time, no key schedule, no block structure. The flash contains instructions in the form the core executes them. The security module decides whether a given requester is allowed to see them.
That is not a distinction in vocabulary. It changes the whole shape of the problem. With a cipher, effort scales with key length and there is a mathematical question to attack. With an access gate, effort scales with how the gate is configured and what the requester can legitimately do — which is an engineering question, and one that has answers.
What the two-zone arrangement actually does
This part splits its protected memory into two zones, each with a password and each with an OTP configuration block. The zones govern flash sectors and RAM blocks. A requester inside zone one can read zone one’s flash; a requester inside zone two can read zone two’s. Neither can read the other unless the configuration links them.
The gate applies to reads as data. It does not stop the core from fetching instructions from the zone it is executing in, because that would stop the product from working.
| Requester | Target | Result |
|---|---|---|
| Zone one code | Zone one flash | Allowed |
| Zone one code | Zone two flash | Zeros |
| Debug interface, unlocked zone | That zone’s flash | Allowed |
| Debug interface, locked zone | That zone’s flash | Zeros |
Why “reading zeros” is the whole story
Every protected read returns zero. Not an error, not a trap, not a flag. This means:
- A locked part is not distinguishable from an erased part by reading.
- Software running inside the zone cannot detect that it is being denied — it never asks for memory outside its own zone, by construction.
- An attempt that half-succeeds looks identical to one that failed, unless the target address is known to have been populated.
The last point is the practical one. Verification requires an address that is known to contain code. The vector table is the standard choice: if the reset vector reads as a plausible branch, the zone is open; if it reads as zero, it is closed.
Configuration is the real target
Because there is no cipher, the informative object is not the code — it is the configuration that decides who may read the code. On this family the OTP block holds, per zone:
- a lock field deciding whether the password may be changed;
- a CRC lock, enforcing an integrity check over the zone;
- a RAM allocation field, deciding whether code outside the zone may claim the zone’s RAM;
- an execute-only field, which permits fetching but not reading.
Each of these is a bit or a small field, and each is readable before any password is supplied. That makes the configuration the correct first read on any unknown device — it is small, it is outside the gate, and it tells you which of several quite different situations you are in.
Execute-only, and why it is not a lock
An execute-only zone is the most misunderstood state on this family. It permits the core to fetch from the zone and denies data reads. Code runs perfectly. Any attempt to copy it as data returns something that is not the code.
From outside, such a device looks normal and is fully functional. From inside, a debugger that has unlocked the zone still cannot read the array as data — the restriction is on the access type, not on the password.
Recovering code from an execute-only zone is therefore not a matter of finding a better key. It is a matter of obtaining the instructions through a path that the hardware permits: execution. That means observation — timing, bus activity, outputs — and reconstruction, not extraction.
What the CRC lock adds
When the CRC lock is set, the zone’s protected region is covered by a checksum held in OTP. Modifying the array without updating the CRC produces a device that fails its own integrity check at boot.
This matters for two reasons. It prevents the simplest form of modification — patching a few words to change behaviour — and it leaves evidence: a device that will not boot after a partial write is telling you that the check exists and that the write was incomplete.
For a recovery project the CRC is a gift, because it constrains the image. A candidate reconstruction that satisfies the checksum is almost certainly correct in structure, even if individual words are uncertain.
Order of operations on an unknown device
- Read the OTP configuration for both zones. This is always possible and always informative.
- Determine, per zone, whether it is populated, open, locked or execute-only.
- For open zones, read normally and verify against the vector table.
- For locked zones, the question becomes whether the password is available from the product’s own material — production records, build systems, vendor documentation.
- For execute-only zones, plan for observation rather than extraction.
- Only after all of the above, consider physical approaches.
Step four deserves emphasis. On products built by an organisation that still exists, the password is frequently recorded somewhere — in a production script, in a build configuration, in a programming file. Asking is cheaper than any technique in this article.
The limits, stated plainly
- Code behind a locked zone with an unknown password is not recoverable by any electrical means.
- Code in an execute-only zone is not recoverable as data at all.
- Configuration recovered without the code is still useful, because it tells you what the next reader will face.
A device can be simultaneously healthy, functional, and permanently closed. Recognising that early is worth more than any amount of procedure.
Related reading
- TMS320F28075 and the zone-link pointer — the same architecture in its single-link form.
- TMS320F2809 and the unlock sequence — the older, single-module equivalent.
- TMS320F28335 and the physical route — what opening the package changes, and what it does not.
FAQ
Is the flash content encrypted? No. It is stored as instructions and gated by an access check at read time.
Can a locked zone be read through the debug interface? Only after the zone is unlocked with its password. Until then, reads return zeros.
What does execute-only protect against? Data reads and copies. It does not prevent execution, which is the point of the mode.
Does the CRC lock prevent modification? It makes modification detectable, and a device that fails its own check at boot will not run.
Is the configuration readable on a locked part? Yes. The OTP block sits outside the gate, which is why reading it first is the right move.
Conclusion
There is no cipher on the F28375, and treating the problem as decryption sends effort in the wrong direction. The gate is configuration, the configuration is readable, and the difficulty is almost always in establishing which zone is in which state. That is measurable in an hour; a cryptographic framing is unmeasurable forever.
TMS320F28335: What Decapsulation Gives You, and What It Does Not
Decapsulation has a reputation as the dramatic step — acid, a microscope, a device opened like an oyster. The reputation oversells both the difficulty and the payoff. Removing a package is a controlled chemical procedure with well-understood failure modes. What it buys is access: to the die surface, to the bond pads, and to a flash array that no longer has a security module between it and a probe.
What it does not buy is everything. Understanding the boundary is what keeps a decapsulation project from becoming an expensive detour.
What the package is protecting
Two things stand between an outside reader and the array: the access control logic, and the fact that the array is inside silicon. Removing the package addresses the second. The first either remains in the signal path or is bypassed by contacting the array directly.
That distinction defines the two families of technique:
| Approach | What it bypasses | What it requires |
|---|---|---|
| Contact the array through the die surface | The core and its access logic | Precise alignment, no damage to the array’s own decoding |
| Contact the test or debug pads | The package | Knowledge of the pad’s function |
| Read the die optically | Nothing electrical | That the cells are legible at the process node |
On a part of this generation the third is impractical — the array is a flash cell array, not a mask ROM, and its state is not visible as a pattern of doped regions. The first is a serious undertaking. The second is usually the productive one, because the pads exist for exactly this purpose and their function is documented for the silicon, even when the vendor does not document them for the customer.
Die markings, and why they matter more than expected
A decapsulated die carries laser or ink markings: a part number, a date code, sometimes a mask revision. These are the only reliable evidence of which silicon is present, and they answer questions that no electrical test can:
- Whether the part is what the package claims, which is not guaranteed on a counterfeit-heavy market.
- Which revision’s errata apply, since revisions change the behaviour of peripherals in ways that matter when reconstructing firmware.
- Whether two devices from different production runs are the same silicon, which decides whether they can be treated as a matched pair.
On a recovery project, the third item is often the one that changes the plan. A device whose die differs from the reference device cannot be verified against it, and the difference is invisible from the outside.
Preparing a device for decapsulation
Three steps precede any chemistry:
- Record behaviour. The device will not survive in a usable state. Voltage and current at every pin, boot time, communication responses, output waveforms — all of it has to be captured while the device is intact.
- Remove the board. A die on a populated board cannot be worked on while the surrounding components are in the way, and the heat involved is not kind to them.
- Photograph the package. Markings, pin one, orientation. After decapsulation the package is destroyed and the identification goes with it.
The first step is skipped routinely and is the single most expensive omission in the whole procedure. A decapsulated device whose behaviour was never measured is a device whose firmware can be read and whose purpose cannot be confirmed.
What the array looks like from inside
Once the passivation is removed, the flash array is a regular structure with visible decode circuitry between blocks. Access requires either probing the array’s own sense path or driving the internal bus from a point beyond the security module.
The practical difficulties are not exotic: probe positioning at the scale of a modern process, damage to the passivation from repeated contact, and the fact that the device is powered while being probed. Each is a handled problem in the field and each is a source of yield loss on any given device.
Reads obtained this way produce data, not meaning. Interpreting it is the same exercise as decoding any image: find the vector table, anchor on startup code, separate code from data.
What decapsulation does not recover
The list is worth stating plainly, because expectations built on the wrong list waste real money:
- Clock and peripheral configuration — unless it is in the code, it is not in the array, and it was set by code.
- Analog trim values — stored in a factory area that may or may not be part of the flash, and not part of the program image.
- The algorithm’s intent — the instructions come out; the meaning has to be reconstructed.
- Anything never programmed — a part that was erased before decapsulation yields an erased array, opened for nothing.
The last item happens when a device is removed from a product without confirming it still had its program. A part that had already been mass-erased, or had failed, is indistinguishable from a working one until it is opened.
When it is worth doing
The decision rule is straightforward. Decapsulation is worth it when the array contains something that cannot be obtained another way, and when obtaining it justifies a destroyed device.
That means: the device must be working and programmed, no sibling unit must be available with the same build, and the program must be the goal rather than the part. If a sibling unit exists, reading that unit — or simply duplicating it — answers the question without destroying anything.
Where a sibling does not exist, and the device is the last of its build, decapsulation is often the only route to the contents. It is then a one-way operation on a unique object, and the preparation steps become the entire value of the project.
Related reading
- TMS320F28234 and decoding what comes out — how to turn array data into an understanding of the firmware.
- TMS320F28067 and the electrical route — the alternative when the array is reachable without opening anything.
- TMS320F28075 and zone configuration — configuration that lives in OTP and does not survive the array.
FAQ
Does decapsulation damage the device? It ends its useful life as a component. The die remains readable, which is the point.
Can the security module be bypassed by probing? The array can be reached through the die surface, past the access logic. That is the practical reason decapsulation is considered at all.
Do I need the device to be working first? It helps enormously. Behaviour recorded before opening is the only way to confirm what the firmware was for.
Are die markings reliable? They are the best available evidence of silicon revision, and revision drives errata, which drives behaviour.
Is optical reading of a flash array practical? Not on a part of this generation. Flash cell state is not legible as a surface pattern.
Conclusion
Decapsulation is a reliable procedure with a narrow payoff: array access and die identification. It does not recover configuration, trim or intent, and it destroys the device it is performed on. The projects that go well are the ones where the device was measured first and where no sibling unit existed — because in every other case there was a cheaper way to the same answer.
TMS320F28234: Decoding a Program When the Symbols Are Gone
An image read from a production device is a flat sequence of 16-bit words. Nothing in it says where one function ends and the next begins, which regions are code and which are tables, or what any address means. A disassembler will happily produce a listing from the first word to the last, and most of that listing will be wrong — not because the disassembler is faulty, but because it is being asked to decode data as instructions.
Decoding is the work of recovering the structure that the toolchain discarded. On this family three features of the architecture make it more systematic than it first appears.
The vector table gives you the skeleton
The interrupt vector table sits at a fixed base, and every entry is a branch. That is the single most useful fact in the image: a contiguous run of branch instructions at a known address identifies, unambiguously, every routine the firmware considers an entry point.
From those branches you get:
- the address of each interrupt service routine;
- the set of peripherals the firmware actually services, because the vector index identifies the source;
- a rough partition of the image into the handlers and everything else.
Vector tables are also where sloppy builds show themselves. Two entries pointing at the same address means one handler serves two sources. An entry pointing at a single return instruction means the interrupt is enabled and unhandled — often the most informative thing in the whole image, because it says which peripheral the developer intended to use and did not finish.
Initialisation is a fixed order
Startup code on a C2000 device does the same things in roughly the same sequence: disable the watchdog, configure the PLL and clock, set up the peripheral clocks, initialise RAM, copy initialised data, then enable interrupts.
That order is a signature. A region that writes the watchdog register, then the PLL registers, then a block copy, is startup code, and its boundaries are visible because it begins with the first write to the watchdog and ends with the first interrupt enable.
Recognising startup code early pays twice: it identifies the reset entry point, which anchors the whole disassembly, and it exposes the clock configuration, which you need to interpret every timing constant in the rest of the image.
Distinguishing code from data
The hard problem is that a 16-bit word can be a legal instruction and a legal constant at the same time. Three tests reduce the ambiguity:
| Test | Code behaves like | Data behaves like |
|---|---|---|
| Branch alignment | Targets land on instruction boundaries | No branches reference it |
| Return density | Ends with a return, or a branch to one | No returns anywhere inside |
| Call references | Addressed by a call from elsewhere | Addressed by a data read |
The third test is the strongest. In a C28x image, calls and branches carry addresses. A region that is never the target of a call and never branched to is almost never code — it is a table, and its structure is usually regular, because tables are indexed.
Floating-point constants and their give-away
This family has hardware floating point, and firmware that uses it stores single-precision constants as pairs of words. Two properties make them findable:
- A run of values in a narrow numeric range looks like a coefficient set.
- The values are read by a multiply or an add whose operands come from consecutive addresses.
Sort the constant regions by the instruction that reads them and the algorithm’s structure emerges: filters read coefficients in order of tap index, scaling factors appear once, and lookup tables have a regular stride between entries.
This is where decoding produces engineering insight rather than a listing. A block of thirty-two coefficients read in order by a multiply-accumulate loop is a 32-tap filter, and the values say what kind of filter.
Rebuilding call structure
Once entry points and code regions are established, the call graph can be reconstructed mechanically: scan for call instructions, resolve their targets, and record the edges. The result is a graph with no names, and it is still informative.
- A node with many callers is a utility — delay, scaling, communication.
- A node with no callers and no vector entry is dead code, or code reached only by computed branch.
- A strongly connected cluster is a state machine or a scheduler.
- A node reached from a timer vector that calls three others is a control loop.
The third and fourth patterns are what a reader actually wants, and both are visible without a single symbol name.
What decoding does not give you
It does not give you names, types, or the original control structure. A switch compiled to a jump table is a jump table; recovering the case labels requires knowing what the values mean to the application.
It also does not give you the parts of the behaviour that were never in the code: trim values, calibration performed at test time, configuration loaded from an external device. Those live outside the image and have to be recovered from the device or the production process.
And it does not resolve the ambiguity completely. A region that is never called and never branched to might be a table, or might be code reached through a computed jump. In a well-built image such regions are rare; in a hand-written one they are not.
The order that works
- Find the vector table and extract entry points.
- Identify startup code and read the clock and peripheral configuration out of it.
- Disassemble from each entry point independently, allowing the regions to meet in the middle.
- Mark everything not reached as data and test it for regularity.
- Reconstruct calls between the decoded regions.
- Only then read the algorithms.
Step three is the one that saves time. Disassembling linearly from address zero forces every region to start at a boundary the image does not have. Disassembling outward from entry points produces regions that are correct where they exist, and gaps that are honestly gaps.
Related reading
- TMS320F2806 and how the image was captured — the file format decisions that precede decoding.
- TMS320F28335 and the physical route to an image — what to do when no readable image can be obtained electrically.
- TMS320F28375 and multi-zone images — decoding when the image arrives in pieces.
FAQ
Can a disassembler recover function names? No. Names are discarded at build time. Functions can be delimited and characterised, not named.
How do I tell code from a constant table? By references. Code is called or branched to; data is read. A region with neither is data.
What does the vector table tell me that the code does not? Which interrupts are serviced, which are enabled but unhandled, and where the entry points are.
Is a floating-point constant block recognisable? Yes, by its range and by the instructions that read it in sequence. Coefficient sets have a distinctive shape.
What is unrecoverable? Names, types, comments, and anything that was configured outside the image.
Conclusion
Decoding a symbol-free image is a structural exercise: vectors give the entry points, startup gives the clock, references separate code from data, and the call graph gives the shape of the application. What emerges is not source code, but it is enough to describe what the device does and how — which is the question that actually gets asked.