This project demonstrates Advanced Sector Protection technique in S25FL512S NOR Flash. It shows the behavior of flash in Password Protection Mode.
The Password Protection Mode can be enabled by programming a 64-bit password to the flash and setting the ASP Register  bit to zero. The password can be read and verified till the ASP register has not been programmed. Once ASP register has been programmed, the password can no longer be read. In the Password Protection Mode, the PPB array remains locked by default at POR or hardware reset. The Password Unlock command PASSU (E9h) along with the correct password is required to unlock the PPB array. After unlocking, the PPB bits can be programmed or erased. The PPB bits remain unlocked till the next power cycle.
The project is available in GitHub here.
All necessary information like requirements, supported kit, hardware/software setup, getting started with code example, steps followed and expected output are mentioned in the readme file of the project.