Embedded data

Flash erase and write planner

Split a byte range into erase sectors and page-bounded write chunks.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Round the requested nonempty range outward to erase-sector boundaries. Split writes at every page boundary; report erased bytes outside the requested range.

Writing 768 bytes from 0xF00 touches two 4096-byte sectors and needs three 256-byte write chunks. Erase coverage includes 7424 bytes outside the range.

Limits

Uniform zero-based sector/page grids; exact unsigned 64-bit input sizes. Page divides sector; sector divides capacity. Up to 10000 sectors and 20000 chunks. This does not execute erase/write, preserve neighboring data, model nonuniform flash or establish device/controller compatibility.