cancel
Showing results for 
Search instead for 
Did you mean: 

How to use LwIP + LAN8720 +STM32F4

Murad
Visitor

Originally a reply to https://community.st.com/t5/stm32cubemx-mcus/lwip-lan8720/m-p/690602 but needs a new thread


How do i manually add file C and file H ??

7 REPLIES 7

You haven't said what IDE you're using but, for STM32CubeIDE:

  1. copy the .c file into a folder in your project which already has source files;
  2. copy the .h file into a folder in your project which already has header files.

(depending on how your project is set up, those could be the same folder)

Murad
Visitor

I am using STM32CubeIDE. need to add in Core>Inc and Core> Src  ???

Lwip Should be enabled or disabled??

 

 

Безымянный.png

Murad
Visitor

Sorry for so many questions, as I am just starting to work with stm32 controllers and practicing

Ethernet is really not a beginner's project - you should probably start with some more basic projects to get familiar with the tools...

https://www.youtube.com/watch?v=gL8OoS9E1rw&list=PLnMKNibPkDnFCosVVv98U5dCulE6T3Iy8

 

EDIT:

You also haven't said what STM32 you're using, what hardware, etc.

Again, please see the Posting Tips:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

 

PS:

Try a search in the Knowledge Base; eg,

https://community.st.com/t5/stm32-mcus/how-to-use-the-lwip-ethernet-middleware-on-the-stm32h5-series/ta-p/691100?search-action-id=38526787183&search-result-uid=691100

 

Also, as previously noted, LwIP is a widely-used independent 3rd-party project - so a general web search should find a lot...

https://savannah.nongnu.org/projects/lwip/ 

Murad
Visitor

I am using STM32F407VGT6.   ETH mode: RMII. 

PA1ETH_REF_CLKn/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PA2ETH_MDIOn/aAlternate Function Push PullPull-upVery High true
PA7ETH_CRS_DVn/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PB11ETH_TX_ENn/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PB12ETH_TXD0n/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PB13ETH_TXD1n/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PC1ETH_MDCn/aAlternate Function Push PullPull-upVery High true
PC4ETH_RXD0n/aAlternate Function Push PullNo pull-up and no pull-downVery High false
PC5ETH_RXD1n/aAlternate Function Push PullNo pull-up and no pull-downVery High false

Also I activate RCC_MCO_1  -- 25Mhz.

Is that a commercial board, or your own custom design?

Murad
Visitor

My custom design