Skip to content

CherryECAT is a tiny and beautiful, high real-time and low-jitter EtherCAT master stack, specially designed for MCUs running with RTOS

License

Notifications You must be signed in to change notification settings

cherry-embedded/CherryECAT

Repository files navigation

English | 简体中文

CherryECAT

CherryECAT is a tiny and beautiful, high real-time and low-jitter EtherCAT master stack, specially designed for MCUs running with RTOS.

Feature

  • ~ 4K ram, ~32K flash(24K + 8K shell cmd + debug log)
  • Asynchronous queue-based transfer (one transfer can carry multiple datagrams)
  • Zero-copy technology: directly use enet tx/rx buffer to fill and parse ethercat data
  • Support hot-plugging
    • Automatic scanning bus
    • Automatic updating slave information when the topology changes
  • Support automatic monitoring slave status
  • Support distributed clocks
  • Support CANopen over EtherCAT(COE)
  • Support File over EtherCAT(FOE)
  • Support Ethernet over EtherCAT(EOE)
  • Support Slave SII access
  • Support Slave register access
  • Support multi master
  • Support backup redundancy
  • Minimum PDO cyclic time < 40 us (depends on master and slave hardware)
  • Support multi cyclic time(every slave can use different proportional cyclic time)
  • Support ethercat cmd with shell, ref to IgH

Hardware limitations

  • Master

    • CPU (cache > 16K, memcpy speed > 100MB/s)
    • ENET must support descriptor dma and iperf with lwip > 90 Mbps
    • Code must run in ram, ignore if no dc
    • Must support High-Precision Timer (jitter < 1us)
    • Must support High-Precision timestamp (ARM DWT/RISC-V MCYCLE)
    • Must support long long print
  • Slave

    • Must support COE
    • Must support sdo complete access
    • SII must have sync manager information

Shell cmd

ethercat ethercat ethercat ethercat ethercat ethercat ethercat ethercat ethercat

Tool

  • esi_parser

Use esi_parser.py to generate slave eeprom information and download eeprom to slave.

python ./esi_parser.py ECAT_CIA402_ESI.xml eeprom.bin eeprom.h

Parsing XML file: ECAT_CIA402_ESI.xml
Parsed XML: Vendor=0x0048504D, Product=0x00000003
Device Name: ECAT_CIA402
Mailbox RX: 0x1000(128)
Mailbox TX: 0x1080(128)
Generating EEPROM data...
✓ Successfully converted 'ECAT_CIA402_ESI.xml' to 'eeprom.bin'
✓ Generated 2048 bytes of EEPROM data
✓ Vendor ID: 0x0048504D
✓ Product Code: 0x00000003
✓ Revision: 0x00000001
✓ Device Name: ECAT_CIA402
✓ Generated C header file: eeprom.h
  • eni_parser

Use eni_parser.py to generate CherryECAT slave sync config.

python ./eni_parser.py ECAT_CIA402_ENI.xml sync_config.h

Parsing ENI file: ECAT_CIA402_ENI.xml
Generating C code...
✓ Successfully converted 'ECAT_CIA402_ENI.xml' to 'sync_config.h'
✓ Generated C code for 1 slave(s)
✓ Slave 1:
  - RxPDO 0x1602: 3 entries
  - TxPDO 0x1A02: 3 entries

Support Boards

  • HPM6750EVK2/HPM6800EVK/HPM5E00EVK(hybrid internal)
  • RT-Thread RZN2L-EtherKit

Contact

QQ group: 563650597

License

FOE,EOE and Backup redundancy features are available for commercial charge; other are free to use

About

CherryECAT is a tiny and beautiful, high real-time and low-jitter EtherCAT master stack, specially designed for MCUs running with RTOS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •