LPC1769 CRP3 sector 0 problem

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by wernerc on Tue Aug 06 04:55:03 MST 2013

since a long time I am using the LPC1769 with CRP3 code protection for some devices I manufacture.
Normally a new firmware is upload via the once programmed bootloader, no problems here up to now.

But now I need to update the bootloader itself and therefore to erase sector 0 (or the complete chip) which holds the CRP3 protection data.
I tried to erase sector 0 like any other sector from the downloaded firmware, the sector is not erased and keeps intact !

I thought about the erasing all sectors at once with IAP like when using ISP with CRP modes 1 and 2, but using this I screwed up several devices as it seems that all sectors except sector 0 are erased only. And my bootloader is larger than sector 0 !

Another try was to activate ISP handler and erase manually with IAP command 57 decimal, but this didn't work either.

I even tried to check the stack not to be conflicting with IAP/ISP code as well as executing the erase code from RAM, nothing worked.

Any ideas from someone ?