Cortex A9 port crashes at vPortEnterCritical()

I have an application running on the Cortex A9 port that will randomly crash and lock up the entire system. Every time this happens the PC stops at the first instruction in vPortEnterCritical() which is the “CPSID i”, disable interrupts instruction. Do you have any idea what can cause this?

Cortex A9 port crashes at vPortEnterCritical()

Is this causing an exception? If so, is it possible you are in an unprivileged mode when the instruction is executed?

Cortex A9 port crashes at vPortEnterCritical()

It is not causing an exception. What I observe is that the system becomes unresponsive. If I try to halt the processor through JTAG it will not let me open a debug context. The only way of knowing what happened is by reading the Program Counter Sampling Register (DBGPCSR) while the CPU is running. It always stops at the same instruction which is in vPortEnterCritical().