Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Strange data abort problem

2005-10-10 by Sten

Hello,

it is a very strange way to set interrupt vectors...

1) Are you sure that really a "data abort" occurs? All of your "nasty"
vectors pointing to a data abort ISR including undefined instruction,
prefetch abort and SWI!

2) Have you examined where the "data abort" really occurs? If yes: take
a look into assembly code at this position. Data abort only occurs if
you try to access an invalid address (data operand).

3) Where is your vector table located? In RAM or ROM? Why don't you
assign your vectors in your startup file statically?

Regards
  Sten

Joris Hooijberg wrote:
> Hello all,
> 
> While trying to get interrupts to work on a LPC2106 in
> Flash we came
> along some strange kind of problem.
> 
> The code starts up, and starts initializing
> interrupts.
> In the InitInterrupt() routine we set the functions
> the interrupt
> vector should point to:
> 
> irqVector1 = MyTimerInterrupt;
> irqVector0 = DataAbortInterrupt;
> 
> We designed the function 'DataAbortInterrupt()' so
> that it only prints
> the text "Data Abort" on the Hyper Terminal.
> 
> The problem is that assigning the interrupt vectors
> gives us a "Data
> Abort" error on the terminal. The compiler CANT KNOW
> where the
> irqVector0 is pointing to because DataAbortInterrupt
> is assigned after
> MyTimerInterrupt.
> 
> Can anyone tell us what's happening here? And why doe
> we get those anoying Data Aborts at this point... It's
> really getting us crazy...
> 
> This is how the VIC-handling part of the startup.s
> looks:
> 
> @@@@@@@@@@@
> .section .startup,"ax"
> .code 32
> .align 0
> 
> b start
> b irqVector0
> b irqVector0
> b irqVector0
> b irqVector0
> b irqVector0
> b irqVector1
> b irqVector1
> 
> @@@@@@@@@@@@@@@@
> 
> @ create a variable to hold a C function pointer to be
> called on IRQ
> 
> .global irqVector0
> irqVector0:
> .word 0 @ this should be set to a C function
> 
> .global irqVector1
> irqVector1:
> .word 0 @ this should be set to a C function
> 
> @@@@@@@@@@@@
> 
> Thanks,
> Joris and Tiemen
> 


-- 
/************************************************
 Do you need a tiny and efficient real time
 operating system (RTOS) with a preemtive
 multitasking for LPC2000 or AT91SAM7?

   http://nanortos.net-attack.de/

 Or some open-source tools and code for LPC2000?

   http://www.net-attack.de/

************************************************/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.