@nikolz - блокировка записи Flash делается не так и зависит от типа Flash.
Например, берем док GD25Q32C DATASHEET.
Читаем:
BP4, BP3, BP2, BP1, BP0 bits.
The Block Protect (BP4, BP3, BP2, BP1, and BP0) bits are non-volatile. They define the size of the area to be software protected against...