Skip to main content
balazs
Associate III
October 8, 2015
Question

STM32CubeMX and LWIP on STM32F107

  • October 8, 2015
  • 14 replies
  • 3631 views
Posted on October 08, 2015 at 17:00

My goal is to build a very simple HTTP server provided by the MCU.

With CubeMX I generated out an MDK-ARM project using the LWIP stack on Ethernet PHY with RMII.

Ethernet links up with 10Mb/s, but on some reason the DHCP request (generated by CubeMX) does not succeed, so my board does not acquires an IP address.

Also if I set a fix IP (through the CubeMX interface) - it is still not getting applied.

I have not done any modifications on the generated codes yet, just compiled and uploaded to the MCU board.

Do I need to add any additional start-up codes to enable DHCP or at least the FIX IP to work?

Unfortunatelly all of the application notes are for the standard libs, saying that it is already superseeded by CubeMX ... However I cannot find a usable tutorial/documentation/example for CubeMX on howto build a simple HTTP server on LWIP and Ethernet MAC+PHY.

Please advise!

Thanks,

Balas

#cubemx #lwip #ethernet #stm32f1
This topic has been closed for replies.

14 replies

Bino
ST Employee
October 14, 2015
Posted on October 14, 2015 at 12:07

Hi Balas,

The problem you mentioned about GPIO default setting will be considered as a possible change in a future release.

Thanks for your inputs and raising this point.

Best Regards,

/Eric

balazs
balazsAuthor
Associate III
October 14, 2015
Posted on October 14, 2015 at 14:02

Hi Eric,

Yes, I can confirm the problem was not related to DHCP, rather it was the underlying configuration problem, originating from CubeMX-generated configurations: the GPIO pin PA8 was configured as a low speed output, while the MCO output was configured at 50MHz. So the pin was not able to produce the 50MHz output.

Thanks again for your support!

Balas

stm32cube-t
ST Employee
December 1, 2015
Posted on December 01, 2015 at 12:18

Dear user,

Please note the issue will be solved in STM32CubeMX next release: 4.12.0.
leonardo2
Associate II
November 4, 2016
Posted on November 04, 2016 at 11:40

Hallo,

I had problems with the reset part of the CubeMX code and I found out aobut the wrong PA8 setting.

I think hat the bug is still there in version 4.17.

thank you