This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Precise Memory Error

Note: This was originally posted on 3rd August 2010 at http://forums.arm.com

I am working with a Cortex-m3 using assembler and am getting "precise memory errors".  The manuals refer to this fault a lot, but don't actually explain what it IS and how to fix it.  does anybody know?
  • Note: This was originally posted on 4th August 2010 at http://forums.arm.com

    A precise memory error is one where the core knows which instruction caused the fault. This can correspond to a load or a store accessing memory which does not exist, or a prefetch error where the address where an instruction is supposed to be does not exist.

    Imprecise errors are caused by things such as cache line flushes hitting non-existent memory in cached cores. The data may have been in cache for some time, so the core does not know which instruction wrote the data which caused the error.

    How to fix it?

    Check your code is accessing the correct addresses - commonly caused by pointer corruption in code, or in the case of instruction fetch errors and incorrect linker setup.
  • Note: This was originally posted on 6th August 2010 at http://forums.arm.com

    Thanks for your reply.
    turned out to be that the data items were not aligned correctly and this caused the faults.
    Read  up on alignment in the Assembler reference manual and fixed the problem.
    Thanks.
  • Sorry for asking about this after so much time but I am facing similar problem. Can you please elaborate on how did you find out that data items were not aligned and how did you fix the problem. That would really be helpful. Thanks you.

  • How about checking the addresses of those "data items"?

  • The address of the variable is 0x20000130 which is within valid address range of RAM. But the address pointed by BFAR is 0x28000130 which is out of the range. It appears that an extra bit is getting set. Also this fault does not occur every single time. In one board, the fault occurs within 15 mins after power on. While in another board, the fault occurs after more than 1 hour.