[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] HardFault with lwip
From: |
twagner |
Subject: |
Re: [lwip-users] HardFault with lwip |
Date: |
Sun, 17 Apr 2016 23:14:01 -0700 (MST) |
The HardFault happens in the function tcp_output at the line
"if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) {"
after 10 - 20 minuts.
The processor wants to load "seg->tcphdr->seqno" and "useg->tcphdr->seqno"
but one pointer is not valid and the processor crashes at the address
"0800d50a" with a HardFault and the flag unaligned memory access is set.
The SYS_LIGHTWEIGHT_PRO was set and it is a Coretex-M7 (stm32f745).
Increasing the mbox buffer size prevent the mbox errors in the lwip_stats
but this time i had 60 errors at the memp[6].
Here my disassembly:
1010 if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno),
ntohl(useg->tcphdr->seqno))) {
0800d4fc: ldr r3, [r4, #12]
0800d4fe: ldr r0, [r3, #4]
0800d500: bl 0x80097d4 <lwip_ntohl>
0800d504: mov r6, r0
0800d506: ldr.w r3, [r8, #12]
0800d50a: ldr r0, [r3, #4]
0800d50c: bl 0x80097d4 <lwip_ntohl>
0800d510: subs r0, r6, r0
0800d512: cmp r0, #0
0800d514: bge.n 0x800d546 <tcp_output+526>
1012 struct tcp_seg **cur_seg = &(pcb->unacked);
--
View this message in context:
http://lwip.100.n7.nabble.com/HardFault-with-lwip-tp26174p26183.html
Sent from the lwip-users mailing list archive at Nabble.com.