LPC2103 prefetch / data abort exception

Hi,

I am using:

- NXP LPC2103FBD48 with ARM7 core.

- Rowley Associates CrossStudio for ARM v1.7 Build 4.

- C++.

- Compiling with no optimizations.

I have a mysterious bug that is causing, once in a while, a prefetch abort exception or a data abort exception. I suspect it is either the chip or the CrossStudio's fault, because commenting out one single line of source code that says "config_ok=true;" seems to "solve" the problem. However, I need that line, and I hate mysterious problems like this one. Anyway, those exceptions (according to the datasheet) are thrown when the ARM7 core either tries to execute an instruction fetched from "reserved space" or from "AHB/APB space" in the memory map or tries to access data from "reserved space" in the memory map.

The LPC2103 does not have trace. Is there a way to know the address of the instruction that tried the illegal fetch or data access? Doesn't the VIC hold such information? That small piece of information would be very valuable.

Thank you very much, Jon

Reply to
Jon
Loading thread data ...

If you'd read the ARM documentation you'd know that R14_abt contains the address of the instruction that caused the exception (+4 bytes for prefetch abort and +8 for data abort). So save the registers in your abort handlers or set a breakpoint in your debugger.

Wilco

Reply to
Wilco Dijkstra

Hi Jon

Do you have an interrupt handler for a spurious interrupt? As far as I can remember the ARM core fall through the interrupt handler if one is not defined for it and then executes the next handler --> Dat Prefetch Abort - or if you don't have that one then the next one and s forth.....

Good Luck Nico

Reply to
Nico Admin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.