- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
How can I lock the device from future programming or FW updates?
Would like to know for sure - What are the avaliable ways to program the CYPD3120 or change its firmware?
I'm aware of the USB option and the I2C but is there a way to change the product firmware with CC lines or SBU lines or any other way?
Thanks in advance,
Ido
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
Let me explain what i did to solve the problem.
First i used the ppcli in PSOC Programmer to change the device into KILL mode using the PSoC4_WriteProtection command.
You can only use this command after using the following commands (for other users):
OpenPort "YourSWDDevice-MiniProg3/4"
SetProtocol 8
SetPowerVoltage 5.0
PowerOn
DAP_Acquire
In the PSoC_WriteProtection command there are 2 fields - The first one is the mode you want to set the device on - 0x04 is KILL mode.
The second field is what parts of the flash you want to lock - 128 time 00 is unlocked and 128 0xFF is locked.
Like you said is did - PSoC_WriteProtection(0x04,00 00 00 ...) so the device is in KILL mode - but after reseting and making sure i cannot connect again using the SWD pins (since its locked) - i still managed to program the flash using the EZ-PD...
BUT! - if u use PSoC_WriteProtection(0x04,0xFF 0xFF ...) now your flash is also locked and you cannot program the device using the USB or EZ-PD as well and you cannot unlock the flash using the SWD since the device is on KILL mode as well.
So i believe what you wrote is not 100% correct and i hope this comment will help future users.
Best regard,
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ido,
1. The way to lock the device can be supported by SWD programming of One-Time Programmed feature. After this lock, the device cannot be upgrade firmware anymore.
2. CYPD3120 supporting USB bootloading and SWD programming for changing/upgrading firmware by default.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
So clear this one out for me, lets say i want to change something in EZ-PD and then upload it to the CYPD3120 but once i uploaded it - i want *no one* to be able to change it - not with SWD, USB Bootloader, I2C or any other way.
How do i do that step by step?
Thanks in advance,
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ido,
If the "no one" is specified to other person without you, I think you are looking for security upgrade for CCG3 firmware/configuration. Currently, CCG3 default firmware is not support this. You need additional firmware customize to make the security check for CCG3 configurations/firmware upgrade.
If the no one is meaning of no one really, SWD programming of One-Time Programmed is the one you are looking for.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
So lets say i do want to one time program the CYPD3120 using SWD as you said.
Does the normal CYPD3120 support this OTP feature? If not, which CCG3 device does and how do i make it work as a dongle exactly like the normal CYPD3120?
Maybe if i program the normal CYPD3120 using SWD i cant program it anymore using SWD or USB? seems unlikely...
Can you clarify for me exactly how do i make the CYPD3120 one time programmable where "no one" means no one including me.
Thanks'
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ido,
1. The normal CYPD3120 supporting this OTP feature. Please refer CCGx(CYPDxxxx) programming specification. The Lock will set CYPD3120 silicon as KILL MODE.
2. For the PSoC Programmer supporting CCGx could set the mode by this way. After this setting, the CYPD3120 will not be programmed any more. The third party also support this as per CCGx(CYPDxxxx) programming specification (attached file).
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi lisa!
Thank you for your reply...
I've been trying all day to modify the code to put my CYPD3120 in KILL MODE with no success...
Can you please tell me how to modify my CYPD3120-DP dongle base code of yours to make it go into KILL MODE?
Let me add i also modified the config.c file with an EZ-PD saved configuration and it worked.
To conclude, I would love to know where and how do i modify the code so the chip goes into KILL mode after in configured it using my config.c code.
Thanks,
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update!
Hi Lisa!
I managed to change the Protection of the chip to KILL using the CLI and MiniProg4.
But as i mentioned before i would like the chip to be completly locked! - now i cannot access it using the SWD but EZ-PD workes normally!
How do i block the USB Bootloader as well?
Thanks,
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or even Protect all the Flash from a change (kind of WriteProtect everything)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
update for the last time!
I managed to protect the flash after digging in the PSoC4_WriteProtection and finding out the second attribute is Flash protection (did all 0xFF there)
Now my question is - if i go into KILL mode AND do flash protection - is there a way someone can change the flash using the USB bootloader or any other way?
Thanks,
Ido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ido,
It is impossible to upgrade by flash using the USB bootloader or any other way with KILL mode.
Best Regards,
Lisa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lisa,
Let me explain what i did to solve the problem.
First i used the ppcli in PSOC Programmer to change the device into KILL mode using the PSoC4_WriteProtection command.
You can only use this command after using the following commands (for other users):
OpenPort "YourSWDDevice-MiniProg3/4"
SetProtocol 8
SetPowerVoltage 5.0
PowerOn
DAP_Acquire
In the PSoC_WriteProtection command there are 2 fields - The first one is the mode you want to set the device on - 0x04 is KILL mode.
The second field is what parts of the flash you want to lock - 128 time 00 is unlocked and 128 0xFF is locked.
Like you said is did - PSoC_WriteProtection(0x04,00 00 00 ...) so the device is in KILL mode - but after reseting and making sure i cannot connect again using the SWD pins (since its locked) - i still managed to program the flash using the EZ-PD...
BUT! - if u use PSoC_WriteProtection(0x04,0xFF 0xFF ...) now your flash is also locked and you cannot program the device using the USB or EZ-PD as well and you cannot unlock the flash using the SWD since the device is on KILL mode as well.
So i believe what you wrote is not 100% correct and i hope this comment will help future users.
Best regard,
Ido