Integartion of lwip application with emwin GUI application

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

Integartion of lwip application with emwin GUI application

1,392 Views
yvkrkrishna
Contributor II

I am using IMX RT 1050 EVK Board. I have a requirement of sending & receiving the UDP packets and received UDP packet data should be parsed and displayed in GUI parameters.

For this, i have done the following:

1. I have taken the sample emwin example and I have developed my own GUI using APPwin software and generated the code, same integrated in MCU Expresso IDE and flashed to the board. It is worrking.

2. I have developed UDP Sending & Receiving program using lwip library as a separate project. and it is working.


Problem:

When i have integrated lwip library application in emwin example code, ethernet link is failing.

 

pseudo code as follows:

Board.LCD  Init functions

lwip_init();


Can you please suggest how to integrate the lwip library application in emwin library application. Please do the needful.

0 Kudos
8 Replies

1,361 Views
yvkrkrishna
Contributor II

Except the ethernet link is failing, do you meet any fault or not?

    No sir. I have printed the status in PHY_INIT() function call in TERA TERM, Error displaying as below:

"link=0 and

status=4102 Auto-negotiation failed check ENET cable and link partner setting."

If just in your integrated project, commend the emwin calling code, whether the ethernet works or not?

No not working. I have commented the Main_Task() function call which initializes GUI.

 

 

0 Kudos

1,336 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello yvkrkrishna,

   Thanks for your updated information.

   If just comment the emwin, the lwip still not work, seems it is the adding code issues, not the directly integration issues.

  Do you try to add the emwin code to the lwip working project directly?

  Seems you missed some code when you port two code together, I think after you port it, you need to test emwin and lwip code one by one, the let it work together.

  Please also check the related lwip code with the sdk working lwip code, eg, pinmux.c, do you add the related pin configuration? and other lwip drivers, and API calling code.

  Please check it in details again.

  Any updated information, please kindly let me know.

Best Regards,

Kerry

0 Kudos

1,329 Views
yvkrkrishna
Contributor II

Hi,

1. Do you try to add the emwin code to the lwip working project directly?

I have tried but i am facing the integration issues.

That's why i have integrated other way as

first i taken emwin project and then added lwip application to it.

2.Seems you missed some code when you port two code together, I think after you port it, you need to test emwin and lwip code one by one, the let it work together.

I have compared the entire two projects and i have observed i have missed the pin configurations for ENET in pin_mux.c

So i have added those pin configuration settings.

 

3.Please also check the related lwip code with the sdk working lwip code, eg, pinmux.c, do you add the related pin configuration? and other lwip drivers, and API calling code.

I have checked the integrated lwip code with working lwip application code, no changes observed except pin configurations in pinmux.c, i have updated those configuration.

Still i am facing the issues.

Please do the needful.

Please provide any procedure to integrate emwin application with lwip application code.

Thanks & Regards

Krishna

0 Kudos

1,323 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi yvkrkrishna,

  In your first post, you mentioned the lwip is failed, could you please tell me how do you integrate the emwin and the UDP on your side?

 Do you put the data image in the external SDRAM?

 If yes, please try your UDP project directly, and change the memory, whether it works at first.

 Your ongoing integrate project, emwin works OK, and just lwip can't work, right? Do you based it on the lwip working project?

 

Best Regards,

kerry

0 Kudos

1,311 Views
yvkrkrishna
Contributor II

Hi kerryzhou,

Please find the source code of main.c  file in the attachments.

 

In the main() function when i commented Main_Task() function ethernet link should be up as per lwip sample example application.

So i commented Main_Task() function and flashed to board.

In this case , it is showing

status=4102 auto-negotiation failed. Check ENET cable error.

 

Please do the needful

 

Thanks & regards

Krishna

0 Kudos

1,291 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi yvkrkrishna,

  Where is your noncacheable code put, in the external SDRAM or the DTCM?

  Seems this issues is also related to the memory location, you can check the SDK lwip project, that is put in the DTCM.

Best Regards,

Kerry

0 Kudos

1,380 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi yvkrkrishna,

  Except the  ethernet link is failing, do you meet any fault or not?

  Do you try to enlarge the stack size in your project?

  If just in your integrated project, commend the emwin calling code, whether the ethernet works or not?

  

Best Regards,

Kerry

0 Kudos

1,350 Views
yvkrkrishna
Contributor II

Except the ethernet link is failing, do you meet any fault or not?

    No sir. I have printed the status in PHY_INIT() function call in TERA TERM, Error displaying as below:

"link=0 and

status=4102 Auto-negotiation failed check ENET cable and link partner setting."

If just in your integrated project, commend the emwin calling code, whether the ethernet works or not?

No not working. I have commented the Main_Task() function call which initializes GUI.

 

0 Kudos