- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When use of ppcli.exe with the PSoC4_EraseAll command we get Error when PSoC4_ProtectAll has been used.
How do I remove the protection again?
I can write to the device again with "PSoC Programmer" but I cannot find a way to erase/overwrite it again with ppcli.exe
see attached script.
First time it run successfull but second time it fails.
GetPorts
<MiniProg3/1519DD000B2E
0 OK
OpenPort MiniProg3/1519DD000B2E .
<
0 OK
HEX_ReadFile "c:\\SW\\psco4.hex"
<0x00040000
0 OK
SetAcquireMode "reset"
<
0 OK
SetProtocolClock 152
<
0 OK
SetProtocolConnector 0
<
0 OK
SetPowerVoltage 3.0
<
0 OK
DAP_AcquireChip
<
0 OK
PSoC4_GetSiliconID
<1a 08 13 aa
0 OK
PSoC4_GetFlashInfo
<0x00000400
0x00000100
0 OK
PSoC4_EraseAll
E
SWD respond packet contains Failed status!
PSoC4_EraseAll returned 80004005
80004005 OK
PSoC4_ProgramRowFromHex 0x00
E
SWD respond packet contains Failed status!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KlJe_3653291,
This is a known issue and I tried this to reproduce the issue.
1. Change ChipProtection to Protected in PSoC Creator and build the program.
2. Program using PSoC Programmer.
3. Using PPCLI acquire the device and perform erase all as shown -
As a workaround you can try the following -
1. Acquire the device and then change the chip protection to 1 (Open) using PSoC4_WriteProtection() API. PSoC4_WriteProtection() performs an erase internally and thus the entire flash will be erased.
2. Reaquire DAP
I performed a read to log action after this using PSoC Programmer and confirmed that this erases entire flash -
You can also perform erase all after changing the protection setting as shown -
Hope this helps.
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KlJe_3653291,
This is a known issue and I tried this to reproduce the issue.
1. Change ChipProtection to Protected in PSoC Creator and build the program.
2. Program using PSoC Programmer.
3. Using PPCLI acquire the device and perform erase all as shown -
As a workaround you can try the following -
1. Acquire the device and then change the chip protection to 1 (Open) using PSoC4_WriteProtection() API. PSoC4_WriteProtection() performs an erase internally and thus the entire flash will be erased.
2. Reaquire DAP
I performed a read to log action after this using PSoC Programmer and confirmed that this erases entire flash -
You can also perform erase all after changing the protection setting as shown -
Hope this helps.
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is working perfect! you are brilliant 🙂