This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Prefetch abort interrupt

Hi,

I am using the TMS570 XDS510 USB emulator with a TMS570LS20216ZWT.

I am getting a prefetch abort interrupt, which appear to always happen in the same point in the code. It gets to the end of an operation and then instead of returning to the caller it goes to the prefetch abort interrupt.

It goes through this operation sucessfully the first time it is called and returns OK, but when it goes through the operation a second time, it drops out to the prefetch abort interrupt instead of returning.

What might be going wrong?

regards,
Dave

 

  • Hi Dave,

    This points to there being an issue with the link register (CPU register R14). Please check if the link register is stored at the entry of this function (?) and is restored upon exit. This is usually done using the stack, so you could also have an issue with the stack pointer. Please also ensure that there is enough space on the stack so that the there are no chances for the return address on the stack to get corrupted.

    Regards, Sunil

  • What exactly is the exception you're getting? What's the address that the prefetch abort is triggering on? It may caused by the program attempting to jump to a memory location that doesn't exist. It may also occur if you try to prefetch an address that would be improperly aligned. It also may caused by stack pointer setting like Sunil said. I got prefetch exception before when my stack is not big enough and my stack pointer was set to flash..

    Regards,
    QJ

  • My code was passing an array to to a subroutine that was writing beyond the end of the array and therefore causing the corruption.

    Thank you for your support on this problem.

    Regards,

    Dave