This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IAP + philips firmware call & C51 debugger

Trying to use the code shown in the following

http://www.keil.com/support/docs/2045.htm

Basically, shows you how to do In Application programming on a philips device.

I have set my target device to a p89c662 which supports this, but when I call the code inside the debugger (uVision pretending to be the device) it gets to the

CALL 0FFF0H ; call philips firmware line

and chokes with the error:

*** error 65: access violation at C:0xFF00 : no 'execute/read' permission

I'd like to test it before I go anywhere near the device itself, am I missing something or can the C51 enironment not replicate that particular function?

Parents
  • When you write to flash, what you actually do is set some bits to 0. "Erasing" flash actually sets all bits to 1s. If you program the same byte twice without erasing in between, the first write will set some bits to zero, and then the second write will come along and set possibly some other bits to zero. The only way to set a flash bit to 1 is to erase the block.

    Hence, your observed "&& operation". 0x55 & 0x66 == 0x44. The write of 0x55 sets bit 1 to 0; the write of 0x66 can't get it back to a 1. The write of 0x66 sets bit 0 to 0. Both writes have bit 2 == 1, so it remains set after both writes.

Reply
  • When you write to flash, what you actually do is set some bits to 0. "Erasing" flash actually sets all bits to 1s. If you program the same byte twice without erasing in between, the first write will set some bits to zero, and then the second write will come along and set possibly some other bits to zero. The only way to set a flash bit to 1 is to erase the block.

    Hence, your observed "&& operation". 0x55 & 0x66 == 0x44. The write of 0x55 sets bit 1 to 0; the write of 0x66 can't get it back to a 1. The write of 0x66 sets bit 0 to 0. Both writes have bit 2 == 1, so it remains set after both writes.

Children
No data