Issue on LWIP Ping Project

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

Issue on LWIP Ping Project

1,873 Views
Meher_Vanukuri
Contributor I

Hi,

The lwip_ping example code i have tested in RT1170 EVK kit it is working fine i am able to get ping send and ping recv data. I have created a new project and followed the steps like drivers, pin mapping, settings - preprocessor and include paths, finally including same source code. Everything i kept same as example code in new project. But i am unable to get ping recv only ping send is happening.

One thing i observed is after the netif_add, netif_set_default, netif_set_up functions in EIR register 25th(RXF) ,26th(TXB) and 27th(TXF) bits are set to 1 and RDAR register 24th bit updated to 0. But in my new project except RDAR register remaining 3 bits in EIR which i mentioned earlier are not updating. I guess this is one of the reason i'm not getting ping recv.

All the settings, configuration, mapping and source code which i included in new project is same as example code. I am attaching the example code register data. Please help me with this. Thank you

 

0 Kudos
Reply
8 Replies

1,838 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

 

Could you please confirm/tell me the following information.

  • What SDK version are you using?
  • The lwip_ping example is working just fine in your EVK
  • You created a new project from the scratch, and added the lwip_ping example code into it
  • The receive ping is not working in this new project
  • Are you testing this new project in the EVK or is it a custom board?

 

Regards,

Daniel.

 

0 Kudos
Reply

1,766 Views
Meher_Vanukuri
Contributor I

Hi,

  • What SDK version are you using? - MCUXpressoIDE_11.6.1_8255
  • The lwip_ping example is working just fine in your EVK - Yes, it is working fine. 
  • You created a new project from the scratch, and added the lwip_ping example code into it - Yes, i have done all configurations everything similar to lwip_ping example for new project.
  • The receive ping is not working in this new project - Yes, it is not working, ping recv is not happening. In before post i shared few registers that are not updating for new project. I thought this will be one of the reason. Please help me with this. What might be the issue?
  • Are you testing this new project in the EVK or is it a custom board? - I'm testing in EVK only.
0 Kudos
Reply

1,736 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

I understand.

Since the demo app, is working correctly, I would strongly recommend you to use the lwip SDK example as a starting point for your new application, and not to replicate the lwip example in a new one.

It seems some configurations can be missing in the new project.

 

In case this is not an option for you, probably another way to attack this is to use third part tools to compare both of your projects and see what are the differences between them, focusing in the lwip files.

 

I hope this helps.

Regards,

Daniel.

0 Kudos
Reply

1,606 Views
Meher_Vanukuri
Contributor I

Hi,

I have used third party tools for comparision, made everything same. But that is not helping, again getting same issue.

In our custom board we have 10/100Mbps Ethernet port. To test interfaces in our custom board we have merged all the source codes including ethernet. The merged code are working fine to test all interfaces except ethernet. Because for this merged code project i need to include drivers, setting and configuration related to ethernet same as like following the steps when creating a seperate new project for ethernet. Please help me with this.

Tags (1)
0 Kudos
Reply

1,586 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

I understand.

Are you using FreeRTOS in your application?

0 Kudos
Reply

1,581 Views
Meher_Vanukuri
Contributor I

No, I am not using free RTOS using Bare-metal

0 Kudos
Reply

1,567 Views
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

If the files are identical, probably the ping functionality is not working correctly because the application is causing conflicts.

I would recommend you to try FreeRTOS and create tasks for specific functionalities. In this case one for the ping.

Or maybe another way to solve this is to create your application basing yourself in the example. In other words, take the example and build your application from there.

 

I hope this helps.

Regards,

Daniel.

0 Kudos
Reply

1,546 Views
Meher_Vanukuri
Contributor I

Hi,

I am encountering a discrepancy in the operation of Ethernet functionality between the provided example code and my custom project. In the provided example code, certain register bits such as EIR register's 25th (RXF), 26th (TXB), and 27th (TXF) bits are set to 1, and the RDAR register's 24th bit is updated to 0. However these register bits remain unchanged, and the RDAR 24th bit sets to 1 instead. These bits are getting updated after netif_add, netif_set_default, netif_set_up function calls.

I suspect that these register updates are handled by interrupts, but I am unable to locate the specific handler responsible for these updates in my custom project codebase.

kindly guide me to the relevant handler or section of the code where these register updates are managed? Any insights or suggestions on debugging this issue would be greatly appreciated. I am attaching the snippet of registers in example code.

Thank you in advance.

0 Kudos
Reply