PSoC 5lp Flash protection

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

cross mob
toka_1312631
Level 1
Level 1
First like received First like given

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
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

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.

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

Yes, it will secure the proprietary code.