AnsweredAssumed Answered

How to IAP Sector0?

Question asked by Peter Van Hoomissen on Feb 27, 2017
Latest reply on Apr 12, 2018 by Grace Zhang

I have started several threads and worked through most of my problems however I can not seem to get past this one. 

 

I am not able to erase or program the first 512bytes of sector0. All of my IAP commands return CMD_SUCCESS. But when I read back after an erase the data in the first 512bytes is the same. The rest of the sector will be erased properly after programming, and written properly after a write. The CRP is set to 0xFFFFFFFF, I relocate the interrupt table to RAM, but nothing seems to change the behavior. 

 

I am able to program data into the first 512bytes if I use the minimum write size of 256bytes however the data is full of errors. There are bits set that shouldn't be and some that should are not. Worse, after I write the chip no longer responds to IAP commands, including check ID. They never return a response, and the DHCSR reports that the core is in "LOCKUP". I am still able to read the JTAG id and write to the DPs and APs, even read and write to RAM, and read flash. But as soon as I try an IAP command the core locks up. I am not sure what it is about the state of the chip that causes it to lock, as erasing the chip with a ULink2 is able to recover it.

 

I see that several other people have posted about this issue in the LPC Forums but not with these specifics. I believe some guidance from an NXP engineer is needed.

 

Best regards,

 

Peter

Outcomes