How to properly initialize LwIP for static IP or DHCP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-17 05:44 PM
For example, my EEPROM has setting for static IP or DHCP.
The problems is MX_LWIP_Init() does not have proper user code sections. It always call dhcp_start(), but I do not need it in case of static IP. The other problem is no any static IP config and all my changes lost each time I regenerate code. Maybe i'm missing something?
- Labels:
-
Ethernet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-04-18 05:18 AM
Hello @ARaid.1 ,
You can start with LwIP application under STM32CubeXX MCU package with a similar type of your project to deduce what is going wrong in your case.
Check the post How to make Ethernet and lwIP working on STM32, and the example in this article "How to create project for STM32H7 with Ethernet and LwIP stack working" it may help you.
> all my changes lost each time I regenerate code.
In CubeMx, make sure to enable the option: Keep user code when regenerating the C code.
Imen
Thanks
Imen