EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Need help on data abort, prefetch abort, underfined instruction exception on AT91SAM7.

Started by Jin Ling Zhang September 6, 2005
Hi, everyone,
 
I'm doing project on AT91SARM7S64 evaluation board with a compiler of IAR. I download my code to the flash and it can run a few seconds or minute. After that, it goes to the data abort interrupt, prefetch abort interrupt or underfined instruction interrupt in most cases. I'm using the Cstartup code from IAR. The code do nothing on above interrupt except an endless loop. Has any one has such kind of problem before and can give me some help. I'm not get familiar with the Assembler code of ARM.
 
Thanks.
 
Jeff.


On Wednesday 07 September 2005 03:10, Jin Ling Zhang wrote:
> Hi, everyone,
>
> I'm doing project on AT91SARM7S64 evaluation board with a compiler of IAR.
> I download my code to the flash and it can run a few seconds or minute.
> After that, it goes to the data abort interrupt, prefetch abort interrupt
> or underfined instruction interrupt in most cases. I'm using the Cstartup
> code from IAR. The code do nothing on above interrupt except an endless
> loop. Has any one has such kind of problem before and can give me some
> help. I'm not get familiar with the Assembler code of ARM.

A data abort happens when the CPU tries to access data at an invalid pointer.
A prefetch abort happens when the CPU tries to access code from an invalid
location.
An undefined intruction happens when the CPU cannot understand the code it
fetches.

These are generally caused by pointer corruptions. The most likely causes of
these are:
* Stack corruption because the stack is too small or is being overwritten.
* variables holding pointers being overwritten.

The most likely of these, imho is your stack being overwritten.



Hello Jeff,

I had this problem to start with. I found in my case it was because I
had set the cpu clock source too fast and it was doing one of the
following: reeding the wrong data in, storring data to the wrong location.

Things to check.
Flash wait state,
Cpu clock speed (Phase locked loop, clock divider etc) Regards Peter
--

Peter Wintulich
VoiceTronix
Powering Open Telephony
www.voicetronix.com.au



Memfault Beyond the Launch