cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563RGT6 with LAN8742A phy

aravindpv
Associate II

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...
 

aravindpv_0-1750917437924.pngaravindpv_1-1750917664915.pngaravindpv_2-1750917679386.png

 

12 REPLIES 12
STackPointer64
ST Employee

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,

To improve visibility of answered topics, please click Accept as Solution on the reply that resolved your issue or answered your question.

Hi thanks for the reply @STackPointer64 . Please find the details below

aravindpv_0-1751367676570.png

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.

STackPointer64
ST Employee

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,

 

To improve visibility of answered topics, please click Accept as Solution on the reply that resolved your issue or answered your question.
STackPointer64
ST Employee

Hello @aravindpv,

Do you have any updates regarding your problem? Were you able to resolve it?

Best regards,
To improve visibility of answered topics, please click Accept as Solution on the reply that resolved your issue or answered your question.

@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.

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.

To improve visibility of answered topics, please click Accept as Solution on the reply that resolved your issue or answered your question.

Yes i followed the steps and tried building LwIP_TCP_Echo_Server  

STackPointer64
ST Employee

Could you please attach your project so I can review it? If the project is private, feel free to send it to me privately.

To improve visibility of answered topics, please click Accept as Solution on the reply that resolved your issue or answered your question.

@STackPointer64 
Hi please find the attachment