--- In lpc2000@yahoogroups.com, "jorishooijberg" <jorishooijberg@y...> wrote: > > --- In lpc2000@yahoogroups.com, Rob Jansen <rob@m...> wrote: > > > indeed a strange way to initialize the interrupts. > > I've got the same kind of questions as Sten when looking at this code. > > OK, it IS a nasty interrupt table... guilty as charged... > > > If your looking for startup code, have a look at > > http://www.myvoice.nl/electronics/files/i2c-test.zip > > The startup code in here is the same as embeddedjanitor's example. > We changed our startup.s like this: > > > .section .startup,"ax" > .code 32 > .align 0 > > LDR PC,[PC,#resetHandlerAddress - . - 8] > LDR PC,[PC,#undefHandlerAddress - . - 8] > LDR PC,[PC,#swiHandlerAddress - . - 8] > LDR PC,[PC,#prefetch_abortHandlerAddress - . - 8] > LDR PC,[PC,#data_abortHandlerAddress - . - 8] > NOP > LDR PC,[PC,#irqHandlerAddress - . - 8] > LDR PC,[PC,#fiqHandlerAddress - . - 8] > > resetHandlerAddress: > .word start > > [etc etc] > > irqHandlerAddress: > .word MyTimerInterrupt > > fiqHandlerAddress: > .word MyTimerInterrupt > > > # > # Reserve memory for exception handlers > # > #0x00000020 > HandleReset: > > [etc etc] > #0x00000034 > HandleIRQ: > > #0x00000038 > HandleFIQ: > > > Running the code gives us A Prefetch error, but the interrupts are > handled correct. > Is seems that the processor doesn't like it when we change the program > counter... Did we forget something? > > Anyay, thanks for the help, > > Joris > Hello Joris, This is a very complicated way to modify the PC. But this immediate displacment relative to the PC will only work under certain circumstances. It is quite dangerous! And the data abort vector is found correctly? Are you sure? Do you know at which address this error occur? Just check the link register R14 and see your assembly code what happens. Sten
Message
Re: Strange data abort problem
2005-10-11 by bdmlpc
Attachments
- No local attachments were found for this message.