Forums

Interrupts during IAP

Started by Karl Olsen December 16, 2004

Hello all,

Normally all interrupts should be disabled during IAP calls. But if
the interrupt vectors and all interrupt code are relocated to RAM,
are there any limits as to how much time interrupt handlers
may "steal" from the foreground program during IAP erase/write calls?

Karl Olsen



An Engineer's Guide to the LPC2100 Series


I have set the UART interrupt up to run from RAM so I can use it
during IAP writing to FLASH yet it causes the same problem as if I
were running the interrupt from FLASH.
Does any one have any experience this?

The interrupt vector in startup.s is:

LDR PC, [PC, #-0x0FF0] /* Vector from VicVectAddr */

And the vector address for my UART1 interrupt is my RAM function:

VICVectAddr2 = (unsigned long)u1intRAM; This works fine by itself, but not when I try to use IAP with the
UART interrupt anabled and all the rest disabled.

Could it still be getting something from FLASH?




--- In , "rjwal3" <rossjwalker@n...> wrote:
>
> I have set the UART interrupt up to run from RAM so I can use it
> during IAP writing to FLASH yet it causes the same problem as if I
> were running the interrupt from FLASH.
> Does any one have any experience this?
>
> The interrupt vector in startup.s is:
>
> LDR PC, [PC, #-0x0FF0] /* Vector from VicVectAddr */
>
> And the vector address for my UART1 interrupt is my RAM function:
>
> VICVectAddr2 = (unsigned long)u1intRAM; > This works fine by itself, but not when I try to use IAP with the
> UART interrupt anabled and all the rest disabled.
>
> Could it still be getting something from FLASH?

Have you relocated the interrupt vectors, i.e. copied them from flash
to RAM and changed MEMMAP?

Karl Olsen




--- In , "Karl Olsen" <kro@p...> wrote:
>
> --- In , "rjwal3" <rossjwalker@n...> wrote:
> >
> > I have set the UART interrupt up to run from RAM so I can use it
> > during IAP writing to FLASH yet it causes the same problem as if
I
> > were running the interrupt from FLASH.
> > Does any one have any experience this?
> >
> > The interrupt vector in startup.s is:
> >
> > LDR PC, [PC, #-0x0FF0] /* Vector from VicVectAddr */
> >
> > And the vector address for my UART1 interrupt is my RAM
function:
> >
> > VICVectAddr2 = (unsigned long)u1intRAM;
> >
> >
> > This works fine by itself, but not when I try to use IAP with
the
> > UART interrupt anabled and all the rest disabled.
> >
> > Could it still be getting something from FLASH?
>
> Have you relocated the interrupt vectors, i.e. copied them from
flash
> to RAM and changed MEMMAP?
>
> Karl Olsen


yes I have copied the interrupt vectors to 0x4000000, and the
interrupt procedures are in RAM as well and MEMMAP = 2.
This All works fine unless I try to use it in conjunction with IAP,
and the IAP works fine provided the interrupt is disabled. I can't
see why it wont work, I guess more research is required.I





Hi Ross,

You might try tracing execution of the ISR in assembly mode to make
absolutely certain that no accesses are made to flash. This would
include constant data (i.e., initializers inside a function) as well
as code. Every CPU access must be to RAM or a to a peripheral, since
flash is unavailable during IAP.

Tom
--- In , "rjwal3" <rossjwalker@n...> wrote:
>
> --- In , "Karl Olsen" <kro@p...> wrote:
> >
> > --- In , "rjwal3" <rossjwalker@n...> wrote:
> > >
> > > I have set the UART interrupt up to run from RAM so I can use
it
> > > during IAP writing to FLASH yet it causes the same problem as
if
> I
> > > were running the interrupt from FLASH.
> > > Does any one have any experience this?
> > >
> > > The interrupt vector in startup.s is:
> > >
> > > LDR PC, [PC, #-0x0FF0] /* Vector from VicVectAddr */
> > >
> > > And the vector address for my UART1 interrupt is my RAM
> function:
> > >
> > > VICVectAddr2 = (unsigned long)u1intRAM;
> > >
> > >
> > > This works fine by itself, but not when I try to use IAP with
> the
> > > UART interrupt anabled and all the rest disabled.
> > >
> > > Could it still be getting something from FLASH?
> >
> > Have you relocated the interrupt vectors, i.e. copied them from
> flash
> > to RAM and changed MEMMAP?
> >
> > Karl Olsen > yes I have copied the interrupt vectors to 0x4000000, and the
> interrupt procedures are in RAM as well and MEMMAP = 2.
> This All works fine unless I try to use it in conjunction with IAP,
> and the IAP works fine provided the interrupt is disabled. I can't
> see why it wont work, I guess more research is required.I