I am currently looking into a problem, where an undef exception occurs. The time in which the exception occurs,
seem to be random from 5 minutes to 1 hour. And i am writing here because this might be a common error/bug in the code.
The sam7x features some registers, which contain information about these types of exception, MC_ASR & MC_AASR.
The MC_ASR register contains information about the exception type, the following bits were set:
- MISADD = 1 => The last aborted access was due to an address misalignment.
- ABTSZ = 1 0 => Abort size: Word
- ABTTYP = 0 0 => Abort type: Data Read
- MST_ARM = 1 => The last aborted access was due to the ARM.
The MC_AASR contains the address of the offending instruction, which in my case is 0x0011117E.
At that address is the following instruction:
adds r4, r3,#0x0
This instruction is part of the following statement in the tcp_input function: