cancel
Showing results for 
Search instead for 
Did you mean: 

Facing Difficulties with TCP/Ethernet on Nucleo-H753ZI without RTOS

imium
Associate II

Hello ST Community,

I am currently working on a project using the Nucleo-H753ZI without an RTOS, and I have followed a tutorial by Controllers Tech to set up TCP/Ethernet. I am using Static IP assignment.

I can Transmit and Receive data though Hercules Tool. However, when I try to use the ModbusTool for TCP connection, the STM32 does not seem to receive any data.

Problem Description:

  • Ethernet setup is successful, and data transfer works with Hercules software.
  • Using ModbusTool for TCP connection results in no data being received by the STM32.

Configuration Details:

  • While following the Controllers Tech tutorial, I noticed some differences in the CubeMX configuration options compared to what was shown in the tutorial. Despite these differences, I managed to configure the Ethernet settings and get it working for data transfer using Hercules software.
  • Differences:
    1. I have used RMII instead of MII.
    2. I do not have Rx Buffer Address option in Ethernet Parameter Setting.

Steps Taken:

  • Followed the Controllers Tech tutorial.
  • Made necessary adjustments in CubeMX.
  • Tested data transfer with Hercules software successfully.
  • Unable to receive data using ModbusTool.

 

Could anyone provide insights into why the STM32 is not receiving data from the ModbusTool? Are there specific configurations or settings I might be missing? Any advice or guidance would be greatly appreciated. I have attached the IOC file for reference.

Thank you in advance for your help!

Best regards,
Umair Jarullah.

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks for youor reply. I found it yesterday that, there was a logical error in my code i was using strncpy that was causing problem, so i changed it to memcpy.

View solution in original post

2 REPLIES 2
ASEHST
ST Employee

Hello @imium,

For successful Modbus communication, it's crucial that your application correctly implements the Modbus protocol.

You can refer to the Modbus protocol reference guide here for detailed information. Additionally, a free Modbus stack is available for download at FreeModbus, which might be suitable for your project needs.

With Regards,

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks for youor reply. I found it yesterday that, there was a logical error in my code i was using strncpy that was causing problem, so i changed it to memcpy.