Content originally posted in LPCWare by ezequiel on Tue Mar 26 04:56:02 MST 2013
hi,
I'm trying to run the lwIP library in LCP1788 MCU and the KSZ8041 PHY.
I'm trying to run the example tcp_eco no operating system.
The problem is as follows:
While not connect the ethernet cable running the firmware.But when I connect the cable to a PC, hard fault is generated.
The hard-fault error happens in the lpc_low_level_input function line 414
/* Free pbuf from desriptor */
lpc_enetif->rxb[idx] = NULL; <-- Hard fault on this!!!
lpc_enetif->rx_free_descs++;
Here I detail the result of the debug for both cases.
With the ethernet cable connected:
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sys_timeout: 20005028 msecs=5000 handler=arp_timer arg=00000000
netif_set_ipaddr: netif address being changed
netif: IP address of interface netif: netmask of interface netif: GW address of interface netif: added interface en IP addr 192.168.0.44 netmask 255.255.255.0 gw 10.1.10.1
netif: setting default interface en
tcp_bind: bind to port 25
Without the ethernet cable connected:
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sys_timeout: 20005028 msecs=5000 handler=arp_timer arg=00000000
netif_set_ipaddr: netif address being changed
netif: IP address of interface netif: netmask of interface netif: GW address of interface netif: added interface en IP addr 192.168.0.44 netmask 255.255.255.0 gw 10.1.10.1
netif: setting default interface en
tcp_bind: bind to port 25
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sct calling h=arp_timer arg=00000000
tcpip: etharp_tmr()
etharp_timer
sys_timeout: 20005028 msecs=5000 handler=arp_timer arg=00000000
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=ip_reass_timer arg=00000000
sct calling h=ip_reass_timer arg=00000000
tcpip: ip_reass_tmr()
sys_timeout: 2000503c msecs=1000 handler=
.
.
.
.
.
I expect a prompt response,
regards,
Ezequiel Picca.