2025-06-25 11:01 PM - edited 2025-06-26 9:27 PM
Hi as part of my project I am trying to integrate the mentioned parts in subject to control modbus eth relay over tcpip.
What I have done so far.
1. Integrated Lan chip driver to stm32 library and initalization done.
2. Integrated LwIP stack from online resources and confirmed LwIP integration succeeded. (Since i'm using STM32H563RGT6 MCU and it doesnt have inbuilt LwIP stack with in it).
3. Initially tried to establish a connection with my PC and try a ping test.
4. I'm facing ARP Resolution initally but somehow it resolved and now i can find my MCU ip and mac address on my PC, but still ping is not reachable.
5. My POV is that if its capable of handling etherent packets then i can start work on with modbus packets to trigger the relay module.
Pls help me with this case...
2025-07-01 3:28 AM
Hello @aravindpv and welcome to ST community,
To better understand and assist you with this issue, could you attach your STM32CubeMX configuration (.ioc file) so i can review your configuration and reproduce the problem.
Best regards,
2025-07-01 4:04 AM - edited 2025-07-01 4:53 AM
Hi thanks for the reply @STackPointer64 . Please find the details below
this is the IOC view and i uploaded the file as well.
1. I am able to build the integrated LwIP stack successfully
2. IP assignment working properly
3. ARP resolved and able to find the device PC's ARP list.
4. ping isn't getting reply, but not showing not reachable as well just request time out.
5. I can see the traffic on wireshark.
6. I am planning to built a tcp client on top of it for my project project purpose, so I expect the ping establishment is required.
2025-07-02 3:54 AM
Hello @aravindpv,
After analyzing your STM32CubeMX configuration, I suggest increasing your thread stack size to at least 256 words instead of 128. If the issue persists, consider adding an MPU configuration to reduce the risk of memory corruption. Additionally, I recommend reviewing the projects in the repository linked below to compare configurations. Once the ping works, you can take inspiration from the TCP client implementation for your Modbus project.
Best regards,
2025-07-07 2:01 AM
Hello @aravindpv,
Do you have any updates regarding your problem? Were you able to resolve it?
2025-07-07 2:27 AM
@STackPointer64 Hi ,
i updated the stack size as you mentioned
osThreadId_t defaultTaskHandle;
const osThreadAttr_t defaultTask_attributes = {
.name = "defaultTask",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 256 * 4
};
Still there is no ping.
2025-07-07 2:43 AM
Have you tried comparing your project files with the working example I mentioned in my second reply? Doing so will help you pinpoint the issue in your project.
2025-07-07 2:47 AM - edited 2025-07-07 2:47 AM
Yes i followed the steps and tried building LwIP_TCP_Echo_Server
2025-07-07 2:50 AM
Could you please attach your project so I can review it? If the project is private, feel free to send it to me privately.
2025-07-07 3:32 AM
@STackPointer64
Hi please find the attachment