ST72F321J9 Flash/ROM Memory: Three Technologies Behind One Marking
The slug for this page says ST72F321J9 flash ROM memory, and that slash is not sloppiness. It reflects a real ambiguity in the product line: the same microcontroller family has shipped with three different memory technologies, in packages that look identical, carrying part numbers that differ by a single letter in a position most people do not read.
That letter decides everything about how a device can be recovered, and it decides it before any tool is connected. Reaching for the flash procedure on a masked part wastes a session. Reaching for the physical route on an ordinary flash part wastes a sample.
A marking that names a family, not a technology
Part numbers in this range encode the family, the memory size class, the package and the temperature grade. The memory technology is carried in a letter that sits inside the prefix, and it is the character most often transcribed incorrectly, because the rest of the string is what people are used to reading.
| technology | what it means physically | reprogrammable | typical marking cue |
|---|---|---|---|
| flash | floating-gate cells, electrically erasable in blocks | yes, many cycles | the flash letter in the prefix |
| OTP | floating-gate cells in a package without a erase path | once only | the OTP letter in the prefix |
| mask ROM | data programmed into the diffusion or via mask at wafer fabrication | never | a different prefix and often a customer-specific suffix |
The cue is not a proof. Parts get re-marked, documentation gets copied between projects, and the same BOM line sometimes covers a substitution made years ago. What the marking does is tell you which procedure to prepare. What tells you the truth is the device.
How the option bytes give it away
The configuration bytes sit immediately below the interrupt vector table, and they are the cheapest technology test available.
On a flash part, the option bytes are themselves reprogrammable, and the programming interface will accept a write to them after a chip erase. On an OTP part, the same locations are programmed once and cannot be returned to their erased state — a write is accepted only where the bits are still in the erased condition, and the interface refuses or silently produces a partial result where they are not.
| observation when writing the option bytes | conclusion |
|---|---|
| the write is accepted and reads back verified, after an erase | flash |
| the write succeeds on a virgin part and fails on a used one | OTP |
| the option byte region does not respond to the write command at all | mask ROM, or a flash part whose interface is locked |
| the region reads as a coherent value but cannot be erased | OTP already programmed |
The third row needs care, because a protected flash part also refuses. That is why the technology test should be run on a device whose protection state is already known, or after the read-out question has been settled by the method described in ST72F32AK1 flash memory protection.
Why the difference changes the read
For a flash part, the read is a session: enter the programming mode, ask for the array, verify. For an OTP part, the read is the same session but the stakes are different — there is no erase to fall back on, so a botched attempt at changing configuration is permanent.
For a mask ROM part, there is no session at all. The array is not electrically programmable, so there is nothing for a programming interface to talk to. The contents exist as a pattern in the silicon, and the only way to them is optical or electrical observation of the die.
| technology | read route | reversible | sample survives |
|---|---|---|---|
| flash, unprotected | programming session | yes | yes |
| flash, protected | die-level access | no | no |
| OTP, unprotected | programming session, read only | not applicable | yes |
| OTP, protected | die-level access | no | no |
| mask ROM | die-level access only | no | no |
OTP: the technology that punishes enthusiasm
An OTP device in an unprotected state reads exactly like a flash device. That similarity is the trap. A technician who is used to flash parts will attempt a configuration change, discover that the change does not take, and attempt it again with a different value — and each attempt permanently programs bits that were previously blank.
The visible result is an option byte region that contains a mixture of two different configurations, which reads as a third configuration that nobody intended. Devices in this state are still readable, but their behaviour is unpredictable, and a customer who receives one back will report that the part was damaged during the job.
The discipline is simple and worth stating explicitly: on any device whose technology has not been positively identified, do not write the option bytes. Read them, observe, and stop.
Mask ROM: reading what is not electrically readable
A masked device stores its program as a pattern of implants or contacts created during fabrication. There is no floating gate to charge, no block to erase, and no command set that addresses the array. The contents are visible only by looking at the silicon.
That changes the nature of the work entirely. There is no verification against a checksum, no block-level read status, and no second attempt at the same address. What replaces those is preparation: knowing the memory map exactly, knowing where the vector table sits, and knowing what the first bytes of a valid reset handler look like, because the interpretation has to be built from the layout rather than from the tool.
What the customer’s BOM probably says
The BOM line usually gives the part number and nothing else. When the number is ambiguous — a re-marked part, a substitution, a number copied from an older revision of the schematic — the ambiguity propagates into the quotation, and a quote built on the wrong technology is wrong by an order of magnitude.
The cheapest way to remove the ambiguity is a photograph of the package marking before anything else happens. The second cheapest is the option byte observation above. Neither costs a sample, and both prevent the situation where a customer approves a flash-level quotation and then discovers the units are masked.
Service scope, per technology
The work splits cleanly along the technology line, and the quote should too.
Flash parts: a session read when the protection permits it, a die-level read when it does not. OTP parts: a session read where the configuration is open, a die-level read otherwise, with a clear statement that no configuration change will be attempted. Masked parts: die-level only, with the deliverable being a reconstructed image plus the map that makes it interpretable.
The physical route itself is described in ST72F321AR secured memory, which covers what changes when a job moves from a socket to a microscope. For devices where the technology turns out to be flash and the map has to be established before the read, the top-aligned layout argument in ST72F32AJ1 flash memory binary is the prerequisite.
The question to ask before quoting
One question eliminates most of the risk: is there any documentation from the original production that names the memory technology, not just the part number? A programming file, an order confirmation, a datasheet revision note.
If the answer is yes, the quotation can be specific. If the answer is no, the quotation should be structured in stages — identification first, then the read — because a single fixed price for an unknown technology is either padded enough to cover the worst case or wrong.