Author Topic: IAP of LPC935  (Read 5110 times)

Bernhard 'Gustl' Bauer

  • Guest
IAP of LPC935
« on: July 06, 2005, 07:38:36 am »
Hi,

this may not fit here, but maybe you can help me.

I try to program a LPC935 via IAP calls.  They report a HVE error. Programming with flashmagic works.  I have no IRQs, just booting and getting the data via I2C (polling). So there should be no reason for a  HVE error. I use the 'Program User Code Page' call. The key is set before. Is there something else to be done before?

 I had a look at the code ISP uses for programming. I can find no difference to mine.

Does someone does know where to get the code of the bootrom (0FF00h). Maybe this could explain where the problem is.

TIA

Gustl


erikm

  • Guest
Re: IAP of LPC935
« Reply #1 on: July 06, 2005, 10:52:38 am »
a possible cause will be that you "getting the data via I2C (polling)" use the same RAM slots as the bootloader.

Bernhard 'Gustl' Bauer

  • Guest
Re: IAP of LPC935
« Reply #2 on: July 06, 2005, 10:40:47 pm »
I'm not sure what you mean by 'RAM slots'.

I get the data via I2C and write it to a buffer at address 040h. Buffer size is max. 32 bytes. After that I set AA=0. So I2C is sleeping. The source address I give to IAP call is 040h. But I don't understand what should cause trouble.

Gustl


Bernhard 'Gustl' Bauer

  • Guest
Re: IAP of LPC935
« Reply #3 on: July 07, 2005, 04:06:44 am »
Hi,

I have some further input. When I do a sector erase via flashmagic the 'Program User Code Page' call suddenly works. I tought a 'Program User Code Page' call doesn't need an erase before.  What is the difference between a flashmagic erase and the erase within the 'Program User Code Page' call?

Gustl

erikm

  • Guest
Re: IAP of LPC935
« Reply #4 on: July 07, 2005, 04:51:12 am »
"I'm not sure what you mean by 'RAM slots'.
I get the data via I2C and write it to a buffer at address 040h"

what if the ROM code uses, say address 42 for temporary storage?

Erik

Bernhard 'Gustl' Bauer

  • Guest
Re: IAP of LPC935
« Reply #5 on: July 07, 2005, 05:56:58 am »
"what if the ROM code uses, say address 42 for temporary storage?"

But shouldn't that be documented? I have found nothing. Another reason to for a look at the bootram.

Gustl

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2176
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: IAP of LPC935
« Reply #6 on: July 07, 2005, 09:20:52 am »
I believe that programming Flash memory requires an erase first, unless you are only programming to set bits (or clear bits depending on the flash technology used).

Embedded Systems Academy, Inc.
support at esacademy dot com