Reputation: 11
As announced in the title of the post, I am working on STM32 which I want to connect thanks to the Ethernet and LWIP config. Right now, I just want to ping my card.
I followed several tutorials on websites and youtube. My setup is good. I can ping my card at the address configured in lwip.c BUT I can only ping with the debugger and I need to force the run 4 times to be able to ping and to call my main.c
For a simply soft to blink led, your build, your flash and the system run. In my case, i need to run 4 times and i can do that only with debugger. That's happened just if MX_Lwip_init() or/and MX_LWIP_process() are called I think something happened when i build but i don't know what.
Thanks if someone have response
Have a good day !
Upvotes: 1
Views: 564
Reputation: 1
I have figured out the source of the issue about the CubeIDE problem that I've mentioned above. The ethernet PHY needs a few time about 2 or 3 milliseconds to start after power up. I've simply added a delay function before MX_LWIP_Init and it worked. And for your question, I still assume that the default ARM compiler of Keil is not suitable for the library. Try using CubeIDE it works fine for me. By the way I'm using LAN8720A as the ethernet PHY.
Upvotes: 0
Reputation: 1
I had the same problem. I used STM32CubeIDE instead and it worked but with a even weirder problem. When I run the program in the IDE or even in STM32CubeProgrammer, everything is fine but when I use the power button on my board to reset the MCU, it will not work and I'm not able to ping it. I assume that the first problem that you have the same is related to the C compiler. CubeIDE uses GCC but Keil does not for its default compiler. Maybe you have to change the compiler but it will have its own challenges if you are using STM32CubeMX to generate your project.
Upvotes: 0