Unable to unlock protected sector on S26KL512S

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
LASagr
Level 1
Level 1
First reply posted First question asked Welcome!

Hi everyone,

I try to use password protection on S26KL512S.

My first parameter sector is locked (4Ko size) but I can't unlock it.

After sending unlocking command the other command all return 0. I have no access to hardware PIN.

I have some questions :

1) what is the exact sequence to program Paswword?
       - entry    Password ASO
       - Send 64b Password
       - Command SetExit
or do I need to send each password's word in a sequence (inside entry and exit command) ?

2) After some attempts to program new Password the actual Password is 0. (It is also the same value I read usinf password read command). The PPB Bit Lock is clear  ('1') I have not set It during my test in case of command failure.
Can someone send me the exact command to unlock this sector (at 0 address)?

Thanks

0 Likes
1 Solution
BushraH_91
Moderator
Moderator
Moderator
750 replies posted 50 likes received 250 solutions authored

Hello,

Thank you for contacting Infineon Technology.  

I am not sure what you actually executed  for “After sending unlocking command the other command all return 0. I have no access to hardware PIN”.

In Password Protection mode, the sectors are actually protected by PPB bits. Each sector has a PPB bit associated. When a PPB bit is programmed to “0”, the associated sector is protected. To unprotect the sector, need to reverse the PPB bit from “0” to “1” by using PPB Erase command.

Password is used to protect PPB Lock Bit. If PPB Lock Bit is cleared to 0, then PPB bits cannot be modified. If PPB Lock Bit is 1, then PPB Bits can be modified to lock/unlock sectors. If Password Protection is enabled, PPB Lock Bit is cleared to 0 at power up or hardware reset, thus PPB bits are not able to be modified. If Password Unlock command is sent with correct password, PPB Lock Bit will be set to 1 then changing PPB Bits is allowed.

 

Answer to your questions are below:

  1. The command sequence is correct. But yes, the 4 words password have to be programmed in sequential order, i.e., from word0 to word3.
  2. All the password 64 bits are default 1. The password bits can only be programmed to 0, can not change back to 1 once they are programmed to 0. To unlock sector0, as mentioned above, need to change the sector0 associated PPB bit to 1 by using PPB Erase command.

 

Thank you

Regards,

Bushra

View solution in original post

0 Likes
3 Replies
LASagr
Level 1
Level 1
First reply posted First question asked Welcome!

 I forgot tosay that status after erasing this sector said me that sector is protected using PPB.

I have no problem to write/read/erase all other sector.
The UC is an STM32.

0 Likes
BushraH_91
Moderator
Moderator
Moderator
750 replies posted 50 likes received 250 solutions authored

Hello,

Thank you for contacting Infineon Technology.  

I am not sure what you actually executed  for “After sending unlocking command the other command all return 0. I have no access to hardware PIN”.

In Password Protection mode, the sectors are actually protected by PPB bits. Each sector has a PPB bit associated. When a PPB bit is programmed to “0”, the associated sector is protected. To unprotect the sector, need to reverse the PPB bit from “0” to “1” by using PPB Erase command.

Password is used to protect PPB Lock Bit. If PPB Lock Bit is cleared to 0, then PPB bits cannot be modified. If PPB Lock Bit is 1, then PPB Bits can be modified to lock/unlock sectors. If Password Protection is enabled, PPB Lock Bit is cleared to 0 at power up or hardware reset, thus PPB bits are not able to be modified. If Password Unlock command is sent with correct password, PPB Lock Bit will be set to 1 then changing PPB Bits is allowed.

 

Answer to your questions are below:

  1. The command sequence is correct. But yes, the 4 words password have to be programmed in sequential order, i.e., from word0 to word3.
  2. All the password 64 bits are default 1. The password bits can only be programmed to 0, can not change back to 1 once they are programmed to 0. To unlock sector0, as mentioned above, need to change the sector0 associated PPB bit to 1 by using PPB Erase command.

 

Thank you

Regards,

Bushra

0 Likes
LASagr
Level 1
Level 1
First reply posted First question asked Welcome!

Hi, I find why all command sent will return 0, it is due to a software error during the command to update ASPR value.

If I remove the command to force PPB lock bit in password mode, all other command work.
I correct ASPR function but it's still not working. 

I have an issue now with ASPR, I read 0xFFFF for the ASPR (bit 8 should be '0' as writen in datasheet).
I also can't set the ASPR value to 0xFEFB (I want to  set Password Mode Permanently).

Can  you confirm me order of sequence to protect a sector :

1) I program password

2) I set PPB Bit

3) I write 0xFEFB to ASPR (but this command not work).

Thanks.

0 Likes