flash_sector::is_protected field
Indication of protection status: 0 = unprotected/unlocked, 1 = protected/locked, other = unknown. Set by @c flash_driver::protect_check. This information must be considered stale immediately. A million things could make it stale: power cycle, reset of target, code running on target, etc. If a flash_bank uses an extra array of protection blocks, protection flag is not valid in sector array