Ethernet LWIP assert issue when performing send/receive through TCP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Ethernet LWIP assert issue when performing send/receive through TCP

1,151 次查看
Gangapavan
Contributor II

I'm facing an LWIP assert issue: LWIP_ASSERT("p->tot_len != rxFrame->totLen", p->tot_len == rxFrame->totLen);

While running in tcp_connect_thread or tcp_listen_thread, I'm encountering the above assert, and the program is staying in a while loop. How can I resolve this error? Has anyone faced this error before?

Note: I tried updating the LWIP stack from the latest SDK, but there was no change.

Any suggestions on this?

Refer the attached image for details.

0 项奖励
回复
5 回复数

1,127 次查看
Sam_Gao
NXP Employee
NXP Employee

@Gangapavan 

Which EVK board are you using? How about SW/SDK version? which example? 

How to reproduce this issue? Is there any details about hardware connections.

0 项奖励
回复

1,123 次查看
Gangapavan
Contributor II

I'm using i.MX RT1060 board. SDK version 2.16.

Ethernet PHY: ksz808

I'm using TCP mode to communicate with Ethernet using the LWIP stack.

Scenario:

As soon as the Ethernet/LWIP stack is initialized, xTaskCreate(rx_task, "lwip_rx", ETH_RX_TASK_STACK_SIZE, NULL, ETH_RX_TASK_PRIO, &ethernetif_rx_task); will be created in the background.

After establishing a socket, while running either the tcp_connect_thread or tcp_listen_thread, the aforementioned assert will be generated approximately 3 out of 5 times.

 

0 项奖励
回复

1,069 次查看
Sam_Gao
NXP Employee
NXP Employee

@Gangapavan 

It is still not clear for your questions. please see my comments based on your messgae.

- You only mentioned RT106 EVK board and doesn't provide which example(https://github.com/nxp-mcuxpresso/mcux-sdk-examples/tree/main/evkmimxrt1060 ), ethier no any information about other board (e.g RT1060 EVKB)

- I suppose that you use enet/txrx-transerfer driver level example: https://github.com/nxp-mcuxpresso/mcux-sdk-examples/blob/main/evkmimxrt1060/driver_examples/enet/txr... But the phy is ksz8081, not ksz808. It seems different phy with our offical EVK board. If yes, it is out of support scope.

B.R,

Sam

0 项奖励
回复

1,053 次查看
Gangapavan
Contributor II

@Sam_Gao 

Hi,

we are using customised board based on iMXRT1060 EVKB. We have taken the SDK lwip examples for ethernet application.

The hardware portion of Ethernet is same as Evaluation board.

The phy is ksz8081.

Thanks,

Gangapavan.

 

0 项奖励
回复

1,004 次查看
Sam_Gao
NXP Employee
NXP Employee

@Gangapavan 

Please double check both hardware and software from your side. 

I have no idea about which lwip example are you using, but I confirmed that there are serval lwip-related example work well on our EVK board.

SDK: 2.16.XX

EVK: RT1060 EVKB

Examples: as flowing.

Sam_Gao_0-1743391430275.png

 

0 项奖励
回复