During development the Uboot/Linux driver for S25FL256S flash, I encounter a problem that the flash seems to be locked and cannot be reset. Even the JTAG also cannot erase/program the flash, only debug the code in the RAM.
I tried to read registers, the SR1 = 0x1C, the CR1 = 0xEE. the BPNV bit has been set to 1 and BP2-0 in SR are volatile and will be reset to binary 111 after POR.
How can I unlock the flash?
Did you try to change the value in SR1 and CR1 using WREN and WRR commands?
1. CS# LOW
2. WREN command
3. CS# HIGH
4. CS# LOW
5. WRR command + SR1 value + CR1 value
6. CS# HIGH
Also, please let us know the steps you follow to program and erase flash device.
Thanks and Regards,