Back to Blog

Cost-Effective, High Real-Time EtherCAT Fieldbus Industrial Motion Control Solution

#ethercat#st32

In the past two months' weekends, I ported the SOEM master to STM32. It runs normally in free run mode and can drive Beckhoff I/O slaves. There are some bugs in DC mode, and it can only drive a portion of servo drives.

I plan to document some of the porting process on my blog and share it with everyone. There will certainly be some inaccuracies, and I welcome your criticism and corrections.

The entire porting process is actually similar to porting lwIP to STM32. The SOEM master was designed with a hardware abstraction layer and an operating system abstraction layer architecture, so it's sufficient to modify the code in the osal, oshw, and nicdrv sections.

Of course, I referenced a lot of online resources during the porting process (not limited to the following). Here, I'd like to thank these experts.

lwIP Porting: This part of the information referenced the STM32 tutorials from Atom and Wildfire, as well as the STM32 reference manuals. Just review the Ethernet-related sections. Related Papers: Comrade Wang Huijiao's Master's Thesis "Research on the Implementation of EtherCAT Master Station Based on Embedded Platform" This article is very crucial; it basically elaborates on the detailed porting process, so everyone can study it carefully. Success Stories: Some netizens have successfully ported it to STM32, and I'm sharing their work here. EasyCAT, a project developed by an overseas expert, also based on STM32. "Sharing EtherCAT Master Code Based on STM32 and SOEM" from Amo Electronics Forum and some open-source code on GitHub...

Xinmai Technology EtherCAT Profibus Profinet Bus, Industrial Fieldbus Technology Application Development, The most cost-effective ST32/Infineon solution,

Schematics, source code,

Suitable for beginners learning, company product development, or academic theoretical research,

Full technical support provided.

 Performance Advantages

  1. Faster cycle time, achievable at 31.25us
  2. Lower jitter, jitter time less than 0.004us
  3. Good synchronization performance, master and slave devices can achieve clock synchronization accuracy far less than 1us (4-axis actual measurement: 50ns)

Performance Comparison:

More Performance Comparison Summary: