LWIP TCP echo cause hard_fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LWIP TCP echo cause hard_fault

853 Views
daweiyou
NXP Employee
NXP Employee

Hi Guys:

 

here is one question for LWIP, could you help me check.

I test SDK_2.0_TWR-K65F180M\boards\twrk65f180m\demo_apps\lwip\lwip_tcpecho\freertos using echotool with big package, exceed 500+ bytes, the MCU will enter into Hard_fault interrupt, if use <=500Bytes, all package are echoed.

 

I think it should occur memory conflict for TCP buffer, but have no ideas since Freertos have no debug tool to trace this issue.

Labels (1)
0 Kudos
3 Replies

567 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Can you refer to the ticket:

https://community.nxp.com/thread/395104 

it seems that the phenomenon is similar.

BR

XiangJun Rong

567 Views
daweiyou
NXP Employee
NXP Employee

Hi Xiangjun:

You are right, I think the issue is caused by incontinous buffer copy.Thx.

The ethernetif_input implement should be updated, this is a bug, since the code is ported by NXP, and not found in other MCU.

0 Kudos

567 Views
daweiyou
NXP Employee
NXP Employee

seem all LWIP examples have such issue, how could I adjust the parameters for this big package requiments? and I could bear buffer alloc failed, why the MCU failed, whether lack of memory protection?

0 Kudos