cancel
Showing results for 
Search instead for 
Did you mean: 

stm32cube lwip clean code but no link?

ismail fatih iltar
Associate II
Posted on December 08, 2016 at 12:31

hi everyone. im new at stm32 and im trying to use lwip with cubemx (firmware :stm32cubef4  v1.14.0). my board is stm3241g-eval. and i investigated example projects and it works (ex. udp echo client) I created a new project with selected true board(my board is new and all jumpers at default) and my cube settings are:  

SYS : systick

Eth : MII   (its ok for default eval board)

Clk Conf :  uisng HSE and CLK Mhz = 168

RTOS: no

LWIP : enabled

       lwip  :dhcp disable ( for static)

       phyaddres: 1

       eth global interrupt: enable and priority 5

i use clean code(i didnt add anything) for trying to get link at MX_LWIP_INIT function but it does not work. what is the problem? or what i must to control ? thx

#stm32cube #cubemx #lwip
6 REPLIES 6
Imen.D
ST Employee
Posted on December 08, 2016 at 13:32

Dear

ismail_fatih

,

Welcome to our Cummunity.

Which version of CubeMx are you using ? Check that you are using the last version of STM32CubeMx (4.18) with bug fixes and enhancements.

You'll probably want to review these documents which can help you to go further in your application.:

-

http://www.st.com/content/ccc/resource/technical/document/user_manual/79/6e/5f/d4/5c/25/43/96/DM00103pdf/files/DM00103pdf/jcr:content/translations/en.DM00103pdf

: it maybe helpful as it provides a full description of how to implement In-Application Programming (IAP) using Ethernet communication.

-

http://www.st.com/content/ccc/resource/technical/document/application_note/fd/5d/64/cf/7c/38/4c/30/DM00036pdf/files/DM00036pdf/jcr:content/translations/en.DM00036pdf

: LwIP TCP/IP stack demonstration for STM32F4x7 microcontrollers.

-

http://www.st.com/content/ccc/resource/technical/document/user_manual/65/e8/20/db/16/36/45/f7/DM001036pdf/files/DM001036pdf/jcr:content/translations/en.DM001036pdf

: user manual about “Developing applications on STM32Cube with LwIP TCP/IP stack�?

-

http://www.st.com/content/ccc/resource/technical/document/user_manual/10/c5/1a/43/3a/70/43/7d/DM001047pdf/files/DM001047pdf/jcr:content/translations/en.DM001047pdf

: you can refer to theLwIP section.

Hope this helps you.

Best Regards

-Imen-

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on December 09, 2016 at 15:18

thx for your reply . my cube version is 4.18 and  this documents cant help me i just select stm324x-g eval board @cubemx and than select dhcp disable and i write static ip , gw .. at textboxes then i generate it. after that i opened project at keil. i commented MX_GPIO_INIT function code cause the default code was locking MII . Than i download it to mcu and i started it. As you see this is absolutely clean code which was generated from cubemx.  after starting the mcu  my network symbol changed. bu  at netif_link  codes cannot take a link. the network cable is ok cause i tried example application with this cable and it works. this is some detailed question but i hope someone can help me 

Posted on December 13, 2016 at 16:59

Hi ismail,

I tried to bring up a small application with LwIP only and found that I needed to change the PHY from 1 to zero in the header. You can see the detail at

https://community.st.com/0D50X00009XkgMqSAJ

Posted on December 13, 2016 at 17:06

Hi Imen,

Is there an application note for STM32F745 processors or is the one you link going to be relevant for that?

thanks,

hank

Imen.D
ST Employee
Posted on December 13, 2016 at 18:22

Hi

Barta.Hank

‌,

Theapplication note is applicable to the other STM32 Series, which is usedas reference

STM32F4x7

for simplicity reason.

Best Regards

-Imen-

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on December 13, 2016 at 18:48

Thnk u HankB