lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] CRC error when dhcp_start() used


From: Sergio R. Caprile
Subject: Re: [lwip-users] CRC error when dhcp_start() used
Date: Wed, 17 Feb 2016 13:02:26 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Your port might stil be doing bad stuff and you only see it when you
actually use the memory it trashes.
I would check the lpc routines at the lpc forums and find the reason of
those CRC errors, then you can perhaps check their relationship with
lwIP, if any. lwIP does not do Ethernet stuff; your driver and hardware
do. The fact why the use of DHCP is putting that in evidence elludes me.
In your mode of operation, you call tcp_input, that calls netif_input
and that extracts frames from your chip (I guess, I've only worked in
bare metal).
Your eth chip should do something with incoming frames so they can
follow their flow up to lwIP later when netif_input() is called.
If your chip signals CRC errors is because it sees CRC errors, why it
does that is because "something" is fiddling with its configuration, its
interrupt handler, and/or its memory.
Maybe it is lwIP's fault, but I bet it is your port/driver/application.
Try to find the reason for those errors, wether it is memory trashing or
not can help find the culprit.
Again, all lpc_ is not lwIP but NXP. Even ethernetif_ is vendor code,
layer two code does not belong to lwIP.

On 17/02/2016 10:07 a.m., Sergio R. Caprile wrote:
> lpc_ functions are not part of lwIP. You should go to LPC forums to see
> what they do and why they report Ethernet frame CRC errors, thing lwIP
> does not know and so does not care about.
> 
> You seem to be having a memory trashing scenario.
> Make sure interrupts do not call lwIP functions, lwIP is
> single-threaded, you can basically use it from multiple threads only by
> using the netconn and socket API (do you?), but even so, the main lwIP
> code is mostly non-reentrant.
> 
> By 1.4.x you mean x=?
> In 1.4.1, I'm not sure because I've never used NO_SYS=0, you should be
> calling  sys_check_timeouts() while you wait. There are timers for DHCP.
> (You must for NO_SYS=1). Are you ?
> 


-- 
Sergio R. Caprile, Human Being, Bs.As., Argentina
        http://www.scaprile.ldir.com.ar/



reply via email to

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