cancel
Showing results for 
Search instead for 
Did you mean: 

Third-party TCP/IP stack porting

TChau.2
Associate

Hello,

-> I want to use a third-party TCP/IP stack with the STM32H745-Discovery, and I have gone through LWIP for reference, upon which I got to know that when we enable LWIP and Ethernet from Cube MX it generated ethenetif.c/.h and lwip.c/.h files and included lan8742.c/.h from the BSP components so I am confused that which files are related to LWIP and which are related to only Ethernet configuration and for my application do i need to include lan8742.c/.h files manually or not,

My second question is that when I enabled only ethernet only and checked PHYlinkstatus using a function from lan8742.c, it was initialized properly but when i do the same using my third-party stack, it got stuck in 2-second wait function which is placed at the last of the init function of lan8742. this wait function was using tick count for the wait but this tick was not get updated. its value was constant.

Thanks in advance

2 REPLIES 2
Pavel A.
Evangelist III

> I am confused that which files are related to LWIP and which are related to only Ethernet

The lan8742.c/.h is related only to the ethernet. You'll need to include these manually. Or any other PHY that you have.

> this wait function was using tick count for the wait but this tick was not get updated. its value was constant.

Check that your "HAL" timer tick handler is called. If not - find why and fix.

Piranha
Chief II

You can take the ethenetif.c/.h files as a (very bad) example of how to use the HAL ETH driver.

https://community.st.com/s/question/0D50X0000BOtfhnSQB/how-to-make-ethernet-and-lwip-working-on-stm32