NAND memory frequently contains physical defects—some bytes or columns within a plane may be damaged.
Despite these defects, such NAND chips are still usable because certain controllers are designed to operate even when columns are faulty.
SM controllers are one such family.
SM controllers typically handle bad columns in a straightforward manner: they simply skip the damaged columns, which results in a shifted physical page structure after bad-column removal.
In some devices, removing the bad columns results in different page layouts across planes.
Although the data area size remains identical in all planes, the ECC size may vary.
Steps Required to Extract the Data
1. Detect ECC and Build Page Layouts Separately for Each Plane
Each plane must be processed independently:
a. identify the ECC region
b. determine the data/ECC boundary
c. define the final page layout for that plane
d. find XOR key for all Planes
This ensures that block-level reconstruction uses the correct, per-plane page structure.
2. Reconstruct Logical Block Order for Each Plane
Once layouts are defined, reconstruct blocks per plane:
a. detect block headers and LBN positions
b. validate block order
c. build a clean logical block sequence
The output should be one logical image per plane, each containing correctly ordered blocks based on its own page layout.
When this is performed in the Block Manager element, the data area of the logical image will be exported in the proper sequence.
3. Determine the Data Allocation Type Between Planes
Open all bitmaps in the XOR elements in sync mode and compare data patterns across planes.
If data patterns and LBNs match:
→ Page-based interleaving
→ Images must be united by pages
Unite by Pages (Page-Based Allocation)
When page layouts differ between planes (e.g., differing ECC sizes), they cannot be unified directly inside the Unite element.
To enable page-level merging, follow this procedure:
Export only the data area for each plane using the Block Manager, as described above.
Verify the prerequisites for page-based merging:
a. all logical images must contain the same set of blocks
b. all logical images must have identical total size
c. Determine the data-area size per physical page:
For page sizes > 16 KB (e.g., 17664, 18432): use 16384 bytes (16 × 1024)
For page sizes > 8 KB (e.g., 8832, 9216): use 8192 bytes (8 × 1024)
d. Merge the images using the data-area size as the interleaving step when uniting images in page mode.
If patterns and LBNs different:
→ Non-page-based allocation
→ Images must be concatenated by full size
Concatenation (No Page-Based Allocation)
If allocation between planes is not page-based:
a. use the Concatenate element
b. join images strictly by their full logical size
Conclusion
SM controllers may generate different page layouts between planes due to their internal bad-column handling mechanisms. Although the data area remains uniform, variations in ECC size require independent processing for each plane.
By detecting ECC separately, reconstructing block order per plane, and exporting only the clean data area before merging, reliable data reconstruction is achievable even in cases with layout inconsistencies. Correctly determining the allocation type—page-based interleaving or full-size concatenation—is essential for accurate final reconstruction.
Thank you for reading!
Lukasz Pietrzykowski, Rusolut Team