- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used Psoc Programmer command line (ppcli) to change the lifecyle of the PSoC 6 BLE Prototyping Kit (CY8CPROTO-063-BLE) from normal to secure with debug
I did the following steps:
I can confirm that the lifecycle changed using Psoc Programmer GUI, I can also read and write hex files to the kit.
but the problem is that the kit is not working any more.
Is there something that I am missing, my goal was to protect the hex from being illegally read from the flash by the customer after delivering the kit.
Solved! Go to Solution.
- Labels:
-
ispn:40049:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to the following threads:
(2) Re: PSoC6 Programmer COM API PSoC6_WriteProtection()
The parameter secureRestrict in the API is a 16 byte array which is used to set the corresponding bits in the E-Fuse Secure Access Restrict Registers EFUSE_DATA_SECURE_ACCESS_RESTRICT0 and EFUSE_DATA_SECURE_ACCESS_RESTRICT1. Please note that one fuse in the target device is represented by one byte in data file. The values mean the following:
(1) 0x00 --> Not blown
(2) 0x01 --> Blown
(3) 0xFF --> Ignore
Find out more about the E-Fuse registers in Page#652 of the Register TRM.
If your goal is only to protect the hex, then only set the FLASH_ALLOWED bits.
Did you debug to see if the pointer enters the main of your application? Please elaborate on what you mean by kit isn't working anymore.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please refer to the following threads:
(2) Re: PSoC6 Programmer COM API PSoC6_WriteProtection()
The parameter secureRestrict in the API is a 16 byte array which is used to set the corresponding bits in the E-Fuse Secure Access Restrict Registers EFUSE_DATA_SECURE_ACCESS_RESTRICT0 and EFUSE_DATA_SECURE_ACCESS_RESTRICT1. Please note that one fuse in the target device is represented by one byte in data file. The values mean the following:
(1) 0x00 --> Not blown
(2) 0x01 --> Blown
(3) 0xFF --> Ignore
Find out more about the E-Fuse registers in Page#652 of the Register TRM.
If your goal is only to protect the hex, then only set the FLASH_ALLOWED bits.
Did you debug to see if the pointer enters the main of your application? Please elaborate on what you mean by kit isn't working anymore.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the following code
string strError;
pp.SetAcquireMode("RESET", out strError);
pp.SetProtocol(PP_COM_Wrapper.enumInterfaces.SWD, out strError);
pp.DAP_Acquire(out strError);
byte[] secureRestrict = new byte[16];
byte[] deadRestrict = new byte[16];
bool voltageVerification = false;
byte lifecycle = 1 << 1;
for (int i = 0; i < secureRestrict.Length; i++)
secureRestrict = 0xFF;
for (int i = 0; i < deadRestrict.Length; i++)
deadRestrict = 0xFF;
secureRestrict[8] = 0x01;
secureRestrict[9] = 0x01;
secureRestrict[10] = 0x01;
hr = pp.PSoC6_WriteProtection(lifecycle, secureRestrict, deadRestrict,
voltageVerification, out strError);
if (SUCCEEDED(hr))
Console.WriteLine("Protection Data written successfully!");
else
Console.WriteLine(strError);
and it fails the first time but now it shows the following message
eFuse byte at address 0x14 was not empty, expected - 0, but was - 155.
Failed!
what I mean by the device is not working anymore is that my application code is not being executed (UART Debugging Logs and LEDs )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You had already programmed the lifecycle byte by writing 02 in the first post. Please clarify,
- Were you attempting to write to the same device?
- Did you get "Protection Data written successfully" printed on the console?
- Did you program the secure image and your application code before making the transition?
Please share your project so that we can get more insight on the issue.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was trying a different device
I didn't get "Protection Data written successfully" on the screen, instead I got an error message
I only programmed my application code
my project doesn't contain the secure image, it only contain my application.
could that be the problem, do I have to create a secure image as described in the document, then change the llifecycle ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content