Lwip stack gets hanged in netconn_recv api

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

Lwip stack gets hanged in netconn_recv api

Jump to solution
7,325 Views
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 Kudos
Reply
1 Solution
4,458 Views
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

View solution in original post

0 Kudos
Reply
37 Replies
1,921 Views
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 Kudos
Reply
3,322 Views
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 Kudos
Reply
3,266 Views
rak14
Contributor III

Hi @Nhi_Nguyen ,

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

Thanks

0 Kudos
Reply
2,983 Views
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any update from development team?

 

0 Kudos
Reply
3,205 Views
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 Kudos
Reply
3,134 Views
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 Kudos
Reply
3,075 Views
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 Kudos
Reply
3,050 Views
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 Kudos
Reply
3,087 Views
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 Kudos
Reply
1,915 Views
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 Kudos
Reply
1,908 Views
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 Kudos
Reply
1,904 Views
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 Kudos
Reply
4,459 Views
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 Kudos
Reply
3,225 Views
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 Kudos
Reply
3,194 Views
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 Kudos
Reply
3,181 Views
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 Kudos
Reply
3,102 Views
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 Kudos
Reply