Author Topic: Erasing flash  (Read 4242 times)

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Erasing flash
« on: February 17, 2004, 08:59:28 am »
I have been unable to erase flash blocks using the IAP system
calll documented in the data sheet for the P89C668HBA part.
FlashMagic is able to do this (thank you esacademy). I am able
to program bytes with the IAP system call. So I was wondering
if other people encounted this.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Erasing flash
« Reply #1 on: February 17, 2004, 11:18:49 am »
Flash Magic doesn't do any of this, but the Philips ISP bootloader does. However, we have a free Rx2 IAP library on our website that does what you are trying to do (IAP calls from C). It can easily be adapted for the 66x as the devices are very very similar. You can get it from:

http://www.esacademy.com/faq/progs/flash.htm

Embedded Systems Academy, Inc.
support at esacademy dot com

Rons

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Erasing flash
« Reply #2 on: February 17, 2004, 01:39:09 pm »

Yes I know that FlashMagic doesn't do the work, only makes requests.
I did notice that the files you mentioned do one thing that I am not doing.
Disabling interrupts does the trick. Even though I have a timer tick interrupt
that just bumps a counter, I'm not sure why it must be disabled. But I am
not complaining. Thanks.