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

cross mob
JeHu_3414236
Level 5
Level 5
10 likes received First like received

I am writing the protection state using PSoC6_WriteProtection() and I will see this warning:

psocwarning.png

If I choose Cancel, the next time I try to write protection state on the same chip, I get this error:

GenerateHASH API returned: Error code 0xF0000020: Table of contents 2 (TOC2) CRC check failed or /and magic number is not present.

Is cancelling the operation changing some SFLASH values?  I erase the SFLASH with PSoC Programmer and it still gives this error.  How do I avoid this problem if I cancel the write protection?

0 Likes
1 Solution

I'm not sure if you have used the right sequence of commands. Note that to blow the EFuse you need 2.5V. Hope you are powering the target device at 2.5V.

Please find attached the PPCLI script I used for testing. Just modify it to add your Miniprog3 serial number. When I ran the test three times, I am wasn't able to reproduce your issue. Anything I'm missing?

To run the attached script just run the command

ppcli "--runfile writeprotection.cli"

I'm using the latest PSoC Programmer 3.38.6. If you are on the previous version, can you please try upgrading to the latest version and then trying?

Regards,

Dheeraj

View solution in original post

0 Likes
3 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

The warning is displayed in PSoC Programmer when you try to program EFuse bits. If you click "Cancel", the EFuse bits are not set. You can do an erase after this to get the lifecycle and protection states and you will notice they are in Normal stage.

protect.png

After this I proceeded with "OK" and I was able to change lifecycle stage successfully as shown below:

protect1.png

So it works for me and I wasn't able to reproduce your error. Can you tell me the detailed steps to reproduce this? Basically when are you switching between using PSoC Programmer and PPCLI scripts?

Looking forward to your reply

Regards,

Dheeraj

The problem is intermittent.  I tried doing DAP_Acquire, PSoC6_WriteProtection, DAP_ReleaseChip repeatedly on the same chip and cancelling each time and sometimes it is ok and sometimes gives the 0xF0000020 error.  I don't use PSoC Programmer or erase SFlash.  I don't think it is a hardware problem because I try programming a bootloader instead of calling PSoC6_WriteProtection and it never fails.

0 Likes

I'm not sure if you have used the right sequence of commands. Note that to blow the EFuse you need 2.5V. Hope you are powering the target device at 2.5V.

Please find attached the PPCLI script I used for testing. Just modify it to add your Miniprog3 serial number. When I ran the test three times, I am wasn't able to reproduce your issue. Anything I'm missing?

To run the attached script just run the command

ppcli "--runfile writeprotection.cli"

I'm using the latest PSoC Programmer 3.38.6. If you are on the previous version, can you please try upgrading to the latest version and then trying?

Regards,

Dheeraj

0 Likes