Hello,
We are using Hyper flash S26KS512SDPBHM020 with V3H SoC. We are trying to set some sectors to be protected but we are not able to unlock them.
Actually, after successfully execution of password unlock(Status register 0x80), Executing Write sequence resulting in Lock status Error.
Status register : 0x92 device ready , which means (Device ready, Program error, Sector locked error).
Below is sequence followed:
Solved! Go to Solution.
Hi,
Thank you for your response.
In the points mentioned under "Now after reset", first point is "Unlock password sequence". Could you please elaborate a little on the steps? Please tell as to what are the exact commands being sent to the flash? Are you unlocking the PPB Lock bit, then erasing all the PPB bits to unprotect all the sectors?
I would like to inform you that merely unlocking the PPB Lock bit (setting PPB Lock bit to 1) does not ensure that the previously protected sectors are now unprotected. PPB Lock bit determines whether the PPB bits corresponding to each particular sector can be program/erased or not.
i would request you to go through the following sections from the datasheet that will give you more idea about the above mentioned concept -
Please let me know if you have any confusion in any part.
Regards,
Apurva
Hi,
Thank you for contacting Cypress Community.
I would like to inform you that -
From the command sequence provided by you, I can understand that some of the PPB bits have been programmed (point number 5. Set PPB sector protection sequence). Please correct me if I am wrong. If you are programming some of the PPB bits to 0 and then performing program/erase operation on the sectors corresponding to these bits, then the error received is a normal flash behavior. If you don't wish to protect any of the sectors, you should erase all PPB bits to 0xFF.
Please let me know if you have more questions.
Regards,
Apurva
Thanks for your replay. Actually, I did not describe the sequence correctly, as I did not detailled the unlock password sequence.
Below is sequence followed:
To that point, behaviour is as expected and what you described is totally fine.
Now after reset:
So even after a succesful password unlock sequence, the sector is still protected and Status register reports an error.
On the datasheet:
"In the Password Protection Mode, the PPB Lock Bit is cleared to 0 during POR or a Hardware Reset. The PPB Lock Bit can only set
to 1 by the Password Unlock command sequence. The PPB Lock Bit can be cleared back to 0 with the PPB Lock Bit Clear
sequence."
So setting PPB lock to 1 should occur automatically once Password Unlock sequence suceeded. and this is what is not happening in our case.
Hi,
Thank you for your response.
In the points mentioned under "Now after reset", first point is "Unlock password sequence". Could you please elaborate a little on the steps? Please tell as to what are the exact commands being sent to the flash? Are you unlocking the PPB Lock bit, then erasing all the PPB bits to unprotect all the sectors?
I would like to inform you that merely unlocking the PPB Lock bit (setting PPB Lock bit to 1) does not ensure that the previously protected sectors are now unprotected. PPB Lock bit determines whether the PPB bits corresponding to each particular sector can be program/erased or not.
i would request you to go through the following sections from the datasheet that will give you more idea about the above mentioned concept -
Please let me know if you have any confusion in any part.
Regards,
Apurva
Dear Apurva,
I was able to resolve the issue. And your comment is correct as I was not unprotecting each secto individualy thinking it was done automatically once PPR Lock Bit is set to 1.
Thanks
Rachid