Mask ROM, OTP and Flash differ in how firmware gets written into the chip — at the wafer fab, once by a programmer, or repeatedly in-circuit — and that single difference sets unit cost, update flexibility and how realistically the code can be recovered.

大量生産向けに100万台規模のコントローラを調達している場合でも、元の設計者が不在となった基板からファームウェアを復旧しようとしている場合でも、最初に確認すべき重要なポイントはプログラムメモリ技術です。
この技術方式によって、単価、最低発注数量(MOQ)、そしてエンジニアが想像する以上に、ファームウェア復旧プロジェクトに現実的な解決策が存在するかどうかが決まります。
Whether you are sourcing a controller for a million-unit run or trying to recover firmware from a board whose original designer has gone, the program-memory technology is the first fact worth establishing. It fixes the unit price, the minimum order quantity and — more often than engineers expect — whether a recovery project has any realistic route at all.
How Each Technology Stores Bits
All three store code in transistor cells; only the write mechanism differs.
- Mask ROM is programmed during wafer fabrication. Your image becomes a photomask, and the data becomes part of the silicon’s physical structure. There is no write path inside the chip.
- OTP (one-time programmable) ROM uses floating-gate cells, like EPROM, but ships without a quartz window. A programmer writes it once; it cannot be erased or changed afterwards.
- Flash uses the same floating-gate principle but can be erased and rewritten electrically, typically for tens of thousands of cycles.

수백만 개 규모의 생산을 위한 컨트롤러를 조달하는 경우든, 원래 설계자가 사라진 PCB에서 펌웨어를 복구하려는 경우든, 가장 먼저 확인해야 할 사항은 프로그램 메모리 기술입니다.
이 기술은 부품 가격, 최소 주문 수량(MOQ), 그리고 많은 엔지니어가 예상하는 것보다 더 자주, 복구 프로젝트가 실제로 가능한 경로를 가질 수 있는지를 결정합니다.
Side-by-Side Comparison
| Property | Mask ROM | OTP | Flash |
|---|---|---|---|
| Written when | Wafer fabrication | Once, by programmer | Repeatedly, in-circuit |
| Update after production | No | No | Yes |
| Unit cost (volume) | Lowest | Low–medium | Medium |
| NRE / tooling | Photomask set | None | None |
| Minimum order | Typically thousands | One | One |
| Lead time | Weeks (mask plus fab) | Immediate | Immediate |
| On-chip write path | None | None after programming | Yes |
| Program/erase cycles | N/A | 1 | Roughly 10k–100k |
| Typical use | High volume, frozen code | Cost-sensitive batches | Development, field updates |
Flash dominates new designs because it can be updated. Mask ROM survives only where the code is final and the volume is enormous, and OTP sits between them — cheaper than Flash, more flexible than a mask.
What the Memory Type Means for Recovery
Here the choice stops being purely commercial. Program memory determines which recovery routes exist and how invasive they are.
- Flash-based MCUs are read through their own interfaces. MCU readout protection (RDP on STM32, CRP on NXP LPC, code-protect bits on PIC) gates the debug port; whether it can be lifted depends on the protection level, not on the memory technology.
- OTP MCUs have no erase or rewrite path, so once the part is locked nothing can be re-read through the programmer. Analysis has to examine the cells themselves.
- Mask ROM MCUs carry the strongest structural barrier: the data is a physical pattern with no write-enable path. Recovering it means IC decapsulation to expose the die and then reading the ROM array optically or electrically — practical on many older, coarser geometries, increasingly difficult below roughly 130 nm.
A useful rule: the older and larger the process node, the more realistic a recovery tends to be. Modern encrypted Flash parts are often harder than old Mask ROM parts.
Work of this kind is only acceptable on hardware you own or are authorised in writing to analyse, and reputable labs ask for proof of ownership before quoting.

چه در حال تأمین یک کنترلر برای تولید در مقیاس یک میلیون دستگاه باشید، و چه تلاش کنید Firmware را از یک بردی که طراح اصلی آن دیگر در دسترس نیست بازیابی کنید، فناوری حافظه برنامه (Program Memory Technology) اولین نکتهای است که باید مشخص شود.
این فناوری قیمت هر قطعه، حداقل مقدار سفارش (MOQ) و — بیشتر از چیزی که مهندسان انتظار دارند — امکان وجود یک مسیر واقعی برای اجرای پروژه بازیابی Firmware را تعیین میکند.
FAQ
Is OTP the same as Mask ROM?
Can Mask ROM firmware ever be recovered?
In principle yes — the die can be opened and the ROM array read out. Whether it is practical depends on the process node, the cell layout and whether optical-resistant coding was used.
Is Flash less secure than OTP?
Working Out What You Are Dealing With?
Send the chip marking, package type and board photos. We will identify the memory technology, the protection scheme and the realistic recovery route under NDA — with a feasibility answer before any budget is committed.
Related Articles
Extract IC MCU CodeSep 13, 2022Microchip PIC24FJ32GP202 MCU Flash Memory Firmware Extraction