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

PSoC™ 5, 3 & 1

toka_1312631
Level 1
First like received First like given
Level 1

Hi,

How should I properly secure my code to prevent it from cloning ext. Is it sufficient to do the following:

- set flash security to "W" for bootloader portion
- set flash security to R for all other, non-bootloader portion
- Debug Select = GPIO, Enable Device Protection = On
- Miniprog3: Enable Chip Lock in the programmer options and program the device

Are those steps sufficient or it's still possible the read the flash with debugger...?

Do I need to program Write Once NV Latch to be 100% sure that code is secured?

Regards,

Tomi

1 Solution
GeonaP_26
Moderator
Moderator 50 likes received 25 likes received 10 likes received
Moderator

With the above settings, external read, external write, internal write and debuging interface will be disabled in the project. This will secure the proprietary firmware. Once you program the WO NVL with the correct 32-bit key, the part cannot be programmed further, and becomes an OTP (One Time Programmable) device. It permanently gates off the ability to erase or alter the contents of the latch. Hence OTP should be exercised with extreme caution considering these effects.

View solution in original post

3 Replies
GeonaP_26
Moderator
Moderator 50 likes received 25 likes received 10 likes received
Moderator

With the above settings, external read, external write, internal write and debuging interface will be disabled in the project. This will secure the proprietary firmware. Once you program the WO NVL with the correct 32-bit key, the part cannot be programmed further, and becomes an OTP (One Time Programmable) device. It permanently gates off the ability to erase or alter the contents of the latch. Hence OTP should be exercised with extreme caution considering these effects.

toka_1312631
Level 1
First like received First like given
Level 1

Programming steps:

- set flash security to "W" for bootloader portion

- set flash security to R for all other, non-bootloader portion

- Debug Select = GPIO, Enable Device Protection = On

- Miniprog3: Enable Chip Lock in the programmer options and program the device

In this case I can program the device multiple times and with miniprog3 I'm not able to read back the flash content (I get xxxxx instead of actual flash values). I'm asking if these "Programming steps" are enough to protect the code from cloning. If that's enough than I would't use WO NVL to lock the device.

Regards,

Tomi

GeonaP_26
Moderator
Moderator 50 likes received 25 likes received 10 likes received
Moderator

Yes, it will secure the proprietary code.