Browse Source

docs: release v1.0.0

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 2 tháng trước cách đây
mục cha
commit
ce64632bbb
9 tập tin đã thay đổi với 30 bổ sung21 xóa
  1. 10 6
      README.md
  2. 9 5
      README_zh.md
  3. 2 2
      VERSION
  4. 1 1
      demo/renesas/README.md
  5. BIN
      docs/assets/ethercat9.png
  6. BIN
      docs/assets/ethercat_dc.png
  7. 2 2
      docs/source/conf.py
  8. 2 2
      include/ec_version.h
  9. 4 3
      src/ec_slave.c

+ 10 - 6
README.md

@@ -25,17 +25,20 @@ CherryECAT is a tiny and beautiful, high real-time and low-jitter EtherCAT maste
 - 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 backup redundancy(TODO)**
+- **Minimum PDO cyclic time < 40 us (depends on master and slave hardware)**
+- **DC jitter < 3us (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
 
+The pic shows dc jitter < 3us (hpm6800evk with flash_xip):
+![ethercat](docs/assets/ethercat_dc.png)
+
 ## Hardware limitations
 
 - **Master**
-	- CPU (cache > 16K, memcpy speed > 100MB/s)
+	- 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
@@ -56,6 +59,7 @@ CherryECAT is a tiny and beautiful, high real-time and low-jitter EtherCAT maste
 ![ethercat](docs/assets/ethercat6.png)
 ![ethercat](docs/assets/ethercat7.png)
 ![ethercat](docs/assets/ethercat8.png)
+![ethercat](docs/assets/ethercat9.png)
 
 ## Tool
 
@@ -108,4 +112,4 @@ QQ group: 563650597
 
 ## License
 
-FOE,EOE and Backup redundancy features are available for commercial charge; other are free to use
+FOE, EOE and backup redundancy features are available for commercial charge; other are free to use

+ 9 - 5
README_zh.md

@@ -25,17 +25,20 @@ CherryECAT 是一个小而美的、高实时性、低抖动的 EtherCAT 主机
 - 支持 Slave SII 读写
 - 支持 Slave 寄存器读写
 - 支持多主站
-- 支持备份冗余
-- 最小 PDO cyclic time < 40 us (实际数值受主站硬件和从站硬件影响)
-- 支持多周期(每个从站可以使用不同的成比例的周期)
+- **支持备份冗余(TODO)**
+- **最小 PDO cyclic time < 40 us (实际数值受主站硬件和从站硬件影响)**
+- **DC 抖动 < 3us (实际数值受主站硬件和从站硬件影响)**
+- **支持多周期(每个从站可以使用不同的成比例的周期)**
 - 支持 ethercat 命令行交互,参考 IgH
 
+下图展示 dc 抖动 < 3us (hpm6800evk + flash_xip):
+![ethercat](docs/assets/ethercat_dc.png)
+
 ## 硬件限制
 
 - 主站
 	- CPU (cache > 16K, memcpy speed > 100MB/s)
 	- 以太网必须支持 descriptor dma 并且 iperf with lwip > 90 Mbps
-	- 代码必须跑在 ram 上,如果不使用 DC 同步则忽视
 	- 必须支持高精度定时器(抖动小于 1us)
 	- 必须支持高精度时间戳 (ARM DWT/RISC-V MCYCLE)
 	- 必须支持 64 位打印
@@ -56,6 +59,7 @@ CherryECAT 是一个小而美的、高实时性、低抖动的 EtherCAT 主机
 ![ethercat](docs/assets/ethercat6.png)
 ![ethercat](docs/assets/ethercat7.png)
 ![ethercat](docs/assets/ethercat8.png)
+![ethercat](docs/assets/ethercat9.png)
 
 ## 工具
 
@@ -108,4 +112,4 @@ QQ group: 563650597
 
 ## License
 
-FOE,EOE备份冗余功能为商用收费,其余功能免费商用
+FOE,EOE 以及备份冗余功能为商用收费,其余功能免费商用

+ 2 - 2
VERSION

@@ -1,5 +1,5 @@
-VERSION_MAJOR = 0
-VERSION_MINOR = 1
+VERSION_MAJOR = 1
+VERSION_MINOR = 0
 PATCHLEVEL = 0
 VERSION_TWEAK = 0
 EXTRAVERSION = 0

+ 1 - 1
demo/renesas/README.md

@@ -1 +1 @@
-Refer to https://github.com/sakumisu/sdk-bsp-rzn2l-etherkit/tree/master/projects/etherkit_ethercat_cherryecat
+Refer to https://github.com/RT-Thread-Studio/sdk-bsp-rzn2l-etherkit/tree/master/projects/etherkit_ethercat_cherryecat

BIN
docs/assets/ethercat9.png


BIN
docs/assets/ethercat_dc.png


+ 2 - 2
docs/source/conf.py

@@ -6,8 +6,8 @@ project = 'CherryEC'
 copyright = '2025 ~ 2026, sakumisu'
 author = 'sakumisu'
 
-release = '0.1.0'
-version = '0.1.0'
+release = '1.0.0'
+version = '1.0.0'
 
 # -- General configuration
 

+ 2 - 2
include/ec_version.h

@@ -6,7 +6,7 @@
 #ifndef EC_VERSION_H
 #define EC_VERSION_H
 
-#define CHERRYECAT_VERSION     0x000100
-#define CHERRYECAT_VERSION_STR "v0.1.0"
+#define CHERRYECAT_VERSION     0x010000
+#define CHERRYECAT_VERSION_STR "v1.0.0"
 
 #endif

+ 4 - 3
src/ec_slave.c

@@ -436,15 +436,16 @@ static int ec_slave_config_dc_systime_and_delay(ec_slave_t *slave)
         }
         system_time = EC_READ_U64(datagram->data);
         old_system_time_offset = EC_READ_U64(datagram->data + 16);
-        time_diff = ec_timestamp_get_time_ns() - system_time;
 
         if (slave->base_dc_range == EC_DC_32) {
-            system_time = (uint32_t)system_time + datagram->jiffies_sent * 1000;
+            system_time = (uint32_t)system_time + (jiffies - datagram->jiffies_sent) * 1000;
             old_system_time_offset = (uint32_t)old_system_time_offset;
         } else {
-            system_time = system_time + datagram->jiffies_sent * 1000;
+            system_time = system_time + (jiffies - datagram->jiffies_sent) * 1000;
         }
 
+        time_diff = ec_timestamp_get_time_ns() - system_time;
+
         if (time_diff > 1000000) { // 1ms
             new_system_time_offset = time_diff + old_system_time_offset;
         } else {