cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX and LWIP on STM32F107

balazs
Associate II
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
14 REPLIES 14
Bino
Senior
Posted on October 13, 2015 at 11:26

Hi Balas,

As far as I can guess, the issue does not come from DHCP... Could you confirm?

Examples provided in STM32Cube_FW_F1_V1.2.0 package in Projects\STM3210C_EVAL\Applications\LwIP are all with DHCP enabled in lwipopts.h.

You probably already tried to activate/deactivate DHCP from STM32CubeMX GUI and to generate the code afterward : the code generated especially in MX_LWIP_Init() function is different right?

Then if you confirm that the problem you have is not due to DHCP, investigation should be done on other update you mentioned.

If something new from our side, I will keep you informed,

/Eric

Bino
Senior
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
Associate II
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
Senior III
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
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