1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

LPC2103 prefetch / data abort exception

Discussion in 'Embedded' started by Jon, Mar 1, 2008.

  1. Jon

    Jon Guest

    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
     
    Jon, Mar 1, 2008
    #1
    1. Advertisements

  2. 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
     
    Wilco Dijkstra, Mar 1, 2008
    #2
    1. Advertisements

  3. Jon

    Nico Admin Guest

    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
     
    Nico Admin, Mar 1, 2008
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.