STM32F107上的LWIP仅与w/stmcubemx和keil的调试器一起使用

发布于 2025-01-22 05:06:09 字数 357 浏览 2 评论 0原文

正如帖子标题中宣布的那样,我正在使用STM32工作,这要归功于以太网和LWIP配置。现在,我只想ping我的卡。

我在网站和YouTube上关注了几个教程。我的设置很好。我可以在lwip.c中配置的地址上ping我的卡 但是我只能使用调试器进行ping,我需要强迫运行4次,以便能够ping并打电话给我的main.c,

以获得简单柔软的眨眼LED,您的构建,闪光灯,闪光灯和系统运行。 就我而言,我需要运行4次,只能使用调试器来做到这一点。 如果MX_LWIP_INIT()或/和/和MX_LWIP_PROCESS()被称为MX_LWIP_INIT() 我认为当我建造时发生了什么事,但我不知道什么。

谢谢,如果有人有回应,

祝您有美好的一天!

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 !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请别遗忘我 2025-01-29 05:06:09

我遇到了同样的问题。我改用了STM32Cubeide,它起作用了,但遇到了一个奇怪的问题。当我在IDE甚至在STM32 CubRogrammer中运行该程序时,一切都很好,但是当我使用板上的电源按钮重置MCU时,它将无法使用,而且我无法使用它。
我认为您遇到的第一个问题与C编译器有关。 Cubeide使用GCC,但Keil并非用于其默认编译器。也许您必须更改编译器,但是如果您使用STM32Cubemx来生成项目,它将面临自己的挑战。

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.

凌乱心跳 2025-01-29 05:06:09

我已经弄清楚了我上面提到的有关Cubeide问题的问题的根源。以太网PHY需要几次大约2或3毫秒的电源才能启动。我只是在MX_LWIP_INIT之前添加了延迟功能,并且它起作用。对于您的问题,我仍然假设Keil的默认臂编译器不适合图书馆。尝试使用Cubeide对我来说很好。顺便说一句,我将LAN8720A用作以太网PHY。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文