2023-04-12 04:37 AM
Hello,
We are struggling with the configuration of LwIP for my STM board over FreeRTOS.
We have our own designed board with STM32F777ZIT controller.
Ethernet and LWIP is working as expected as we used without FreeRTOS middleware but we are not able to integrate ethernet with FreeRTOS in STM.
I have attached cumbemx screenshot for ethernet connection to STM.
Also find attached ETH and LWIP settings in cubemx.
We are executing following steps to access FreeRTOS and ethernet.
1.In cubeMX enable ETH in RMII mode set PHY Address as 0 in parameter Setting.
2.Enable LWIP in middleware.set DHCP as enabled (tried it with DHCP disable also)
3.Enable FreeRTOS in CMSIS_V1 mode all other settings in RTOS are as it is.
Then we have generated code and build it...It can build successfully, but does not run as it throws DMA memory errors.
Laptop settings are correct as I can ping board if RTOS is not used.
I would appreciate if you could provide me some step by step, in addition with a reference.
Solved! Go to Solution.
2023-04-12 05:15 AM
Hello @SKale
First let me thank you for posting.
Here are some general steps you can take to troubleshoot the issue:
-First make sure you have configured FreeRTOS correctly for your STM32F777ZIT board. Specifically, ensure that you have set the correct clock frequency and that the heap size is sufficient for your application.
-Second check that your Ethernet hardware is working correctly. You can do this by using a network analyzer tool to monitor the Ethernet packets between your board and laptop. This will allow you to verify that the Ethernet link is established and that packets are being transmitted and received.
-Third verify that your LWIP configuration is correct. Make sure that you have enabled the correct network interface (i.e., Ethernet), and that you have set the IP address, netmask, gateway, and DNS server correctly.
-Fourth check the DMA memory errors that you are encountering. These may be related to the DMA buffer size or configuration.
Thx
Ghofrane
2023-04-12 05:15 AM
Hello @SKale
First let me thank you for posting.
Here are some general steps you can take to troubleshoot the issue:
-First make sure you have configured FreeRTOS correctly for your STM32F777ZIT board. Specifically, ensure that you have set the correct clock frequency and that the heap size is sufficient for your application.
-Second check that your Ethernet hardware is working correctly. You can do this by using a network analyzer tool to monitor the Ethernet packets between your board and laptop. This will allow you to verify that the Ethernet link is established and that packets are being transmitted and received.
-Third verify that your LWIP configuration is correct. Make sure that you have enabled the correct network interface (i.e., Ethernet), and that you have set the IP address, netmask, gateway, and DNS server correctly.
-Fourth check the DMA memory errors that you are encountering. These may be related to the DMA buffer size or configuration.
Thx
Ghofrane
2023-04-12 06:36 AM
Hello again @SKale
I advise you, when you configurated the LwIp project, to get inspired form the steps described in this article: How to create project for STM32H7 with Ethernet and LwIP stack working.
This FAQ may help you to configure your project in STM32CubeMX .
Thx
Ghofrane
2023-04-16 10:49 PM
Hello @Ghofrane GSOURI
Thank you for reply.
Sorry for delay in response.
I have tried above steps
-Yes we have configured FreeRTOS correctly and it works fine when ethernet and LWIP is disabled.
-Ethernet hardware is working properly. If we execute firmware without FreeRTOS its work absolutely fine. I will try it using network analyzer tool today.
-I have checked LWIP configurations and ethernet settings.
-I will post exact DMA error and its details as soon as possible.
Thanks
2023-04-16 10:51 PM
Hello..
Yes I have tried it unfortunately its not working for me...
Actually we are using STM32F777 so skipped some steps in above article.