problem about security bits...

Started by wllin027, August 15, 2006, 04:08:43 AM

Previous topic - Next topic

wllin027

I edited my code in uVision IDE and set security bit 0 and 1 of all memory blocks.
Accroding to the user manual of P89LPC932, setting security bit 1 will disable program & erase of certain memory block and will only be erased by "global erase command" in ISP/IAP mode, or from the parallel programmer.
I downloaded the Hex file into MCU by Flashmagic by followong the 5 steps and "protect ISP code"and "Erase all flash" functions were checked before clicking "start".
When I was done, the security bits were read correctly as I set in uVision.
Operated the same steps again and error message displayed as " unable to erase page 112 via security bits".
Why did flashmagic erase the memory block 0~6 without erasing block 7 ?
Was it result from security bits or Protect ISP code function?
I cancelled the protect ISP code function and wanted to erase flash page 112 but failed.
Was "Erash all flash" function the same as "global erase command"?
Was "protect ISP code"function superior to"global erase command"?
Now, how can I clear the security bits of memory block 7 by Flashmagic?

Thanks!

Andy Ayre

If Protect ISP is turned on then you cannot erase the block or pages that contain the bootloader. An "erase all flash" will be changed into an erase of the blocks and pages that do not contain the bootloader. Each time you try to use that option Flash Magic warns you that this is what it is doing.

If you are using ISP and you try to erase any of those blocks or pages then the device will stop responding because it won't be able to communicate any more. So only disable Protect ISP if you are using the IAP interface to communicate with the device.

Embedded Systems Academy, Inc.
support at esacademy dot com