Lwip stack gets hanged in netconn_recv api

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

Lwip stack gets hanged in netconn_recv api

跳至解决方案
9,046 次查看
rak14
Contributor III

I'm sending continuous data packets from PC client to S32k148 uC server, after some point the netconn_recv gets hanged and doesn't come out of loop.

I've sent the packets from client but noe received in server.

What's the problem here and how can it be solved?

Thanks in advance..

 

0 项奖励
回复
1 解答
6,179 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Thanks for sharing the source code we'll test it and get back to you.

I enabled the DHCP as it's needed for our project initially ut assigns a IP from DHCP server, ping also works but after sometime it's showing request timeout and the destination host unreachable.

What might be the reason and how to resolve this?

Thanks & regards

Rak

在原帖中查看解决方案

0 项奖励
回复
38 回复数
2,511 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

This are the packages I've installed :

But still in peripheral it's showing error.

rak14_0-1696828096534.png

Thanks

Rak

 

0 项奖励
回复
3,911 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

Developer said that could you please send them tcpip configuration's pex file? They want to ensure that this configuration is correct to don't take time to investigate it. Because they didn't reproduce the issue yet, so it is better if you can send them your project.

Best regards,

Nhi

 

 

0 项奖励
回复
3,855 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Please find the configuration file of tcp/ip and ethernet.

Thanks

0 项奖励
回复
3,572 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any update from development team?

 

0 项奖励
回复
3,794 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

Unfortunately, they said that SDK version is old, so they have to take much time to look at it.

I'll remind them and come back to you as soon as I get response from them.

Best regards,

Nhi

 

0 项奖励
回复
3,723 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any updates on this? we are waiting for the response from your side..

From our side when debugged the points we got:

  • The PHY we are using is LAN8710A in MII mode.
  • The data when sent from TCP client (PC) to TCP server(uC) the ethernet frame is not received by Ethernet driver itself. 
  • When working the ethernet data length is 60. And when it hangs it is 54.

 

Thanks 

 

0 项奖励
回复
3,664 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

SW team said that they're working on this, so could you please share configuration/project that you're using and encountered this issue?

Best regards,

Nhi

 

 

0 项奖励
回复
3,639 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Configurations:

  • We are using LAN8710A as an ethernet transceiver.
  • The ethernet driver, lwip stack are taken from NXP examples.
  • And it is integrated with LAN8710A ethernet transceiver driver code which works in MII mode.
  • The ethernet is working in 100Mbps speed, and in tcp/ip configurator we have enabled TCP_ECHO_NETCONN application.

Problem:

  • When we send the data continuously from TCP client (PC) to server (uC). at some point connection has been established data is also sent from client but not received in server side.
0 项奖励
回复
3,676 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi Rak14,

Unfortunately, I didn't receive any update on this. I reminded them already and come back to you as soon as I get response from them.

Best regards,

Nhi

 

0 项奖励
回复
2,505 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

Did you see Update Code in your site?

Nhi_Nguyen_1-1696838258113.png

Best regards,

Nhi

 

0 项奖励
回复
2,498 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Yes, I'm able to see the update code but in the peripherals it's showing error:

rak14_0-1696918186282.png

Thanks,

Rak

 

0 项奖励
回复
2,494 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

You can try to run this command:

go to where install ds ->eclipse-> open cmd

Nhi_Nguyen_0-1696920677165.png

Then launch this command: s32ds.exe -consoleLog

Nhi_Nguyen_1-1696920755911.png

Read log

Nhi_Nguyen_2-1696920826762.png

Maybe you will find any error.

I attached the project that I compiled successful.

Best regards,

Nhi

 

0 项奖励
回复
6,180 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Thanks for sharing the source code we'll test it and get back to you.

I enabled the DHCP as it's needed for our project initially ut assigns a IP from DHCP server, ping also works but after sometime it's showing request timeout and the destination host unreachable.

What might be the reason and how to resolve this?

Thanks & regards

Rak

0 项奖励
回复
304 次查看
RKS1110
Contributor II

If you use the socket API, which I recommend, I found a bug on connection close that I needed to fix. But this was in an older version of the NXP SDK, not sure if it still exists.

Best regards

Looking for embedded projects.
0 项奖励
回复
3,814 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

What version of RTD, FreeRTOS and TCPIP you are using? 

Could you please share your configuration/project?

Best regards,

Nhi

 

0 项奖励
回复
3,783 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Microcontroller used: FS32K148UJT0VLUT

RTM Version: v3.0.0

FreeRTOS: v10.0.1

LWIP stack: stable v2.0.2

TCP/IP stack: v3.0.2

We are using LAN8710A as an ethernet transceiver.

The ethernet driver, lwip stack are taken from NXP examples and it is integrated with LAN8710A ethernet transceiver driver code which works in MII mode. The ethernet is working in 100Mbps speed, and in tcp/ip configurator we have enabled TCP_ECHO_NETCONN application.

When we send continuously the data packets from the PC (as a client) to the microcontroller (as a server) after some time the entire Mainloop task is getting stuck in xQueueReceive API and the tcpecho thread is getting stuck in netconn_recv_data API in turn stuck in xQueueReceive API.

So, what might be the problem causing this and how can it be fixed?

 

 

0 项奖励
回复
3,770 次查看
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

Because we don't do stack, so I created the ticket to stack team. As I known, they start handling this ticket. I'll come back to you as soon as I receive their response.

Best regards,

Nhi

 

0 项奖励
回复
3,691 次查看
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any updates regarding the query?

Further we debugged the tcpecho application and got to know when we send the data from client tcp application to uC the data is not being read in ethernet driver itself in the API ENET_DRV_ReadFrame as we added a printf for data received.
Any inputs on the same?

0 项奖励
回复