lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] lwip + sam7x = udef exception


From: B B
Subject: [lwip-users] lwip + sam7x = udef exception
Date: Tue, 13 Feb 2007 13:35:32 +0000

Hi all,
 
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:
 
tcphdr = (struct tcp_hdr *)((u8_t *) p->payload + IPH_HL(iphdr) * 4);
 
How can i make sure that this statement is correctly aligned ?
 
I am also attaching the lwipopts.h file in case that should be needed.
Any insights into this problem is greatly appriciated.
 
Regards,
 
Martin


Personalize your Live.com homepage with the news, weather, and photos you care about. Try it!

Attachment: lwipopts.h
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]