This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F2837xD DCSM Password visible even after setting Z1_OTPSECLOCK is set



Hi,

1.  Why I am able to see the passwords in CCS after locking the password by setting Z1_OTPSECLOCK register ?  I used tools->On chip flash and unlocked and dumped 0x78000. I can see all the values as expected. When I lock and dump the registers, I can read the password fields (rest of them became 0s).

Before locking:

DcsmZ1Otp                                                                                                                                        0x78010
FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFEF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF EFFFAAAA FF555555 11111111 22222222
33333333 44444444 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF

After locking:

DcsmZ1Otp
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 11111111 22222222
33333333 44444444 00000000 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 00000000 00000000 00000000

I have CSMPSWD (Z1-CSMPSWD0 to Z1-CSMPSWD3/0x5f010-0x5f016) are setup in my environment. I used on chip flash page to lock, unlock and dump the registers. What am I missing ?

2. On CPU2, I first wrote 0xFFFFFFFD and later could not write 0xFFFF5555. I used next ZoneSelectBlock2 and for now it works fine. I should be able to write 0 if OTP has 1.

3. I have large code running from memory. I used GSx blocks and they are not secured. Can I call routine running in secured memory from a routine in unsecured (say GSx) memory ?  I have stack, ebss etc set to unsecured memory. 

Regards,

  • Hi,

    1.  Why I am able to see the passwords in CCS after locking the password by setting Z1_OTPSECLOCK register ?  I used tools->On chip flash and unlocked and dumped 0x78000. I can see all the values as expected. When I lock and dump the registers, I can read the password fields (rest of them became 0s).

    You need to program the bit field [3:0] of Z1_PSWDLOCK location in USER OTP with value other than "1111" to lock the password. Z1_OTPSECLOCK is read only memory map register which gets updated with value programmed in USER OTP at location Z1_PSWDLOCK and others.

     

    2. On CPU2, I first wrote 0xFFFFFFFD and later could not write 0xFFFF5555. I used next ZoneSelectBlock2 and for now it works fine. I should be able to write 0 if OTP has 1.

    Which location you are referring here? All the locations in ZoneSelectBlock are ECC enabled so when you program any location, corresponding ECC location also get programmed. If you try to change the value later, it'll have different ECC value where a '0' may get flipped to '1' hence it'll not work even though actual data have only '1' -> '0' flips. Hence one need to select new ZoneSelectBlock instead of changing the value.

    3. I have large code running from memory. I used GSx blocks and they are not secured. Can I call routine running in secured memory from a routine in unsecured (say GSx) memory ?  I have stack, ebss etc set to unsecured memory. 

    Yes, you should be able to call secure function from non secure code.

    Regards,

    Vivek Singh

  • Thanks. #2 and #3 are resolved. However, I still have to fix #1.

    I am trying to change Z1OTP_PSWDLOCK (offset 10) @ 0x78010. If I read, it returns FFFFFFEF. If I read Z1_OTPSECLOCK, it is 00000FFF (@0x5F002). I tried to change this by using "Program OTP SECLOCK" button ( "On chip Flash" under CCS V6, Z1_PSWDLOCK (0x78010)).
    It returns errors "..already been programmed".

    Does that mean I can not program that location ?

    Regards
  • Hi Vaman,

    The PASWDLOCK value is Z1OTP_PSWDLOCK[3:0] which is still 0xF hence you are seeing the value in Z1_OTPSECLOCK as 0cF for PSWDLOCK. Look like you have programmed the  Z1OTP_PSWDLOCK[7:4] with value 0xE hence the ECC for  Z1OTP_PSWDLOCK is already programmed. As I mentioned in my earlier post, once ECC is programmed, you'll not be able to changed the value again.

    Z1OTP_PASWDLOCK has fixed address so it can not be programmed on this part. You need to use other part to test this. Since this does not impact the device functionality (except the visibility of password memory location) you can still use this part for development and correct the value for PASWDLOCK when try on new part.

    Regards,

    Vivek Singh