# HG changeset patch # User Florian Pose # Date 1203680029 0 # Node ID bfc3f1ab52de57a1bca95f8014c65fd55a4126d1 # Parent 80c3d9c8292f7b4a6ca4a9d76161f7a379296aec Fixed typo SAVEOP -> SAFEOP. diff -r 80c3d9c8292f -r bfc3f1ab52de TODO --- a/TODO Fri Feb 22 11:04:49 2008 +0000 +++ b/TODO Fri Feb 22 11:33:49 2008 +0000 @@ -24,7 +24,6 @@ * Support slaves, that don't support the LRW datagram, only LRD/LWR. * Implement all EtherCAT datagram types. * Rename all occurrences of PDO to Pdo. -* Rename SAVEOP to SAFEOP? Future issues: diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/ethercat_doc.tex --- a/documentation/ethercat_doc.tex Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/ethercat_doc.tex Fri Feb 22 11:33:49 2008 +0000 @@ -2827,7 +2827,7 @@ slave configuration state machine code: \begin{lstlisting}[language=C,numbers=left] - void ec_fsm_slaveconf_saveop(ec_fsm_t *fsm) + void ec_fsm_slaveconf_safeop(ec_fsm_t *fsm) { fsm->change_state(fsm); // execute state change // sub state machine @@ -3191,8 +3191,8 @@ sending the first SDO. $\rightarrow$~SDO\_CONF If no SDO configurations are provided, the slave can now directly be - brought into the SAVEOP state and the state change state machine is - started again. $\rightarrow$~SAVEOP + brought into the SAFEOP state and the state change state machine is + started again. $\rightarrow$~SAFEOP Otherwise, all supported FMMUs are configured according to the PDOs requested via the master's realtime interface. The appropriate @@ -3202,9 +3202,9 @@ has SDOs to configure, it is begun with sending the first SDO. $\rightarrow$~SDO\_CONF - Otherwise, the slave can now be brought into the SAVEOP state. The + Otherwise, the slave can now be brought into the SAFEOP state. The state change state machine is started. - $\rightarrow$~SAVEOP + $\rightarrow$~SAFEOP \item[SDO\_CONF] The CoE state machine is executed until termination. $\rightarrow$~SDO\_CONF @@ -3212,17 +3212,17 @@ If another SDO has to be configured, a new SDO download sequence is begun. $\rightarrow$~SDO\_CONF - Otherwise, the slave can now be brought into the SAVEOP state. The + Otherwise, the slave can now be brought into the SAFEOP state. The state change state machine is started. - $\rightarrow$~SAVEOP - -\item[SAVEOP] The state change state machine is executed until - termination. $\rightarrow$~SAVEOP + $\rightarrow$~SAFEOP + +\item[SAFEOP] The state change state machine is executed until + termination. $\rightarrow$~SAFEOP If the state change failed, the configuration has to be aborted. $\rightarrow$~END - If the SAVEOP state was the target state, the configuration is + If the SAFEOP state was the target state, the configuration is finished. $\rightarrow$~END The slave can now directly be brought into the OP state and the @@ -3631,10 +3631,10 @@ The best time to apply SDO configurations is during the slave's PREOP state, because mailbox communication is already possible and slave's application will start with updating input data in the succeeding -SAVEOP state. Therefore the SDO configuration has to be part of the +SAFEOP state. Therefore the SDO configuration has to be part of the slave configuration state machine (see section~\ref{sec:fsm-conf}): It is implemented via an SDO download state machine, that is executed -just before entering the slave's SAVEOP state. In this way, it is +just before entering the slave's SAFEOP state. In this way, it is guaranteed that the SDO configurations are applied each time, the slave is reconfigured. @@ -3890,15 +3890,15 @@ \begin{lstlisting}[gobble=4] # `\textbf{cat /sys/ethercat0/slave003/state}` OP - # `\textbf{echo SAVEOP > /sys/ethercat0/slave003/state}` + # `\textbf{echo SAFEOP > /sys/ethercat0/slave003/state}` \end{lstlisting} This command should also be receipted with a syslog message: \begin{lstlisting}[gobble=4] - EtherCAT: Accepted new state SAVEOP for slave 3. - EtherCAT: Changing state of slave 3 from OP to SAVEOP. - EtherCAT: Slave states: INIT, SAVEOP, OP. + EtherCAT: Accepted new state SAFEOP for slave 3. + EtherCAT: Changing state of slave 3 from OP to SAFEOP. + EtherCAT: Slave states: INIT, SAFEOP, OP. \end{lstlisting} After the new requested state was accepted from user space, the @@ -3996,7 +3996,7 @@ 0 1:0 OP EK1100 Ethernet Kopplerklemme (2A E-Bus) 1 1:1 INIT EL4132 2K. Ana. Ausgang +/-10V 2 1:2 INIT EL4132 2K. Ana. Ausgang +/-10V - 3 1:3 SAVEOP EL4132 2K. Ana. Ausgang +/-10V + 3 1:3 SAFEOP EL4132 2K. Ana. Ausgang +/-10V 4 1:4 INIT EL5101 Incremental Encoder Interface 5 1:5 INIT EL1014 4K. Dig. Eingang 24V, 10s 6 1:6 OP EL6601 1 Port Switch (Ethernet, CoE) diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/graphs/fsm_slave_conf.dot --- a/documentation/graphs/fsm_slave_conf.dot Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/graphs/fsm_slave_conf.dot Fri Feb 22 11:33:49 2008 +0000 @@ -11,7 +11,7 @@ enter_sdo_conf [shape=point,label=""] enter_mapping [shape=point,label=""] enter_pdo_sync [shape=point,label=""] - enter_saveop [shape=point,label=""] + enter_safeop [shape=point,label=""] start -> init [weight=10] init -> init @@ -31,7 +31,7 @@ preop -> error preop -> end [label="PREOP req."] preop -> enter_sdo_conf [weight=10] - enter_sdo_conf -> enter_saveop [label="No configuration"] + enter_sdo_conf -> enter_safeop [label="No configuration"] enter_sdo_conf -> enter_mapping [label="No SDO configs"] enter_sdo_conf -> sdo_conf [label="SDO configs", weight=10] sdo_conf -> sdo_conf @@ -49,16 +49,16 @@ pdo_sync -> pdo_sync pdo_sync -> error pdo_sync -> enter_fmmu [weight=10] - enter_fmmu -> enter_saveop + enter_fmmu -> enter_safeop enter_fmmu -> fmmu [label="FMMUs to configure", weight=10] fmmu -> fmmu fmmu -> error - fmmu -> enter_saveop [weight=10] - enter_saveop -> saveop - saveop -> saveop - saveop -> error - saveop -> end [label="SAVEOP req."] - saveop -> op [weight=10] + fmmu -> enter_safeop [weight=10] + enter_safeop -> safeop + safeop -> safeop + safeop -> error + safeop -> end [label="SAFEOP req."] + safeop -> op [weight=10] op -> op op -> error op -> end [weight=10] diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/images/fsm-slaveconf.eps --- a/documentation/images/fsm-slaveconf.eps Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/images/fsm-slaveconf.eps Fri Feb 22 11:33:49 2008 +0000 @@ -1,8 +1,8 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: fsm-slaveconf.fig %%Creator: fig2dev Version 3.2 Patchlevel 4 -%%CreationDate: Sat Aug 5 09:10:48 2006 -%%For: fp@jupiter (Florian Pose) +%%CreationDate: Fri Feb 22 12:24:01 2008 +%%For: fp@fetlas (Florian Pose) %%BoundingBox: 0 0 316 492 %%Magnification: 1.0000 %%EndComments @@ -142,7 +142,7 @@ /Helvetica ff 180.00 scf sf 4275 6923 m -gs 1 -1 sc (SAVEOP) dup sw pop 2 div neg 0 rm col0 sh gr +gs 1 -1 sc (SAFEOP) dup sw pop 2 div neg 0 rm col0 sh gr % Ellipse n 4275 8003 855 360 0 360 DrawEllipse gs col0 s gr diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/images/fsm-slaveconf.fig --- a/documentation/images/fsm-slaveconf.fig Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/images/fsm-slaveconf.fig Fri Feb 22 11:33:49 2008 +0000 @@ -10,36 +10,36 @@ 0 32 #8e8e8e 6 3413 893 5137 1627 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 1260 855 360 3420 900 5130 1620 -4 1 0 50 -1 16 12 0.0000 4 120 585 4275 1305 INIT\001 +4 1 0 50 -1 16 12 0.0000 4 135 330 4275 1305 INIT\001 -6 6 3413 2011 5137 2745 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 2378 855 360 3420 2018 5130 2738 -4 1 0 50 -1 16 12 0.0000 4 120 930 4275 2423 SYNC\001 +4 1 0 50 -1 16 12 0.0000 4 135 525 4275 2423 SYNC\001 -6 6 3413 3136 5137 3870 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 3503 855 360 3420 3143 5130 3863 -4 1 0 50 -1 16 12 0.0000 4 120 1170 4275 3548 PREOP\001 +4 1 0 50 -1 16 12 0.0000 4 135 630 4275 3548 PREOP\001 -6 6 3413 4261 5137 4995 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 4628 855 360 3420 4268 5130 4988 -4 1 0 50 -1 16 12 0.0000 4 120 945 4275 4673 FMMU\001 +4 1 0 50 -1 16 12 0.0000 4 135 570 4275 4673 FMMU\001 -6 6 3360 5386 5190 6120 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 5753 855 360 3420 5393 5130 6113 -4 1 0 50 -1 16 12 0.0000 4 150 1830 4275 5798 SDO_CONF\001 +4 1 0 50 -1 16 12 0.0000 4 165 1050 4275 5798 SDO_CONF\001 -6 -6 3413 6511 5137 7245 +6 3375 6480 5175 7245 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 6878 855 360 3420 6518 5130 7238 -4 1 0 50 -1 16 12 0.0000 4 120 1380 4275 6923 SAVEOP\001 +4 1 0 50 -1 16 12 0.0000 4 135 765 4275 6923 SAFEOP\001 -6 6 3413 7636 5137 8370 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 4275 8003 855 360 3420 7643 5130 8363 -4 1 0 50 -1 16 12 0.0000 4 120 480 4275 8048 OP\001 +4 1 0 50 -1 16 12 0.0000 4 135 270 4275 8048 OP\001 -6 6 6075 4230 7830 4995 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 6968 4628 855 360 6113 4268 7823 4988 1 2 0 1 0 7 50 -1 -1 0.000 1 0.0000 6968 4635 748 315 6220 4320 7716 4950 -4 1 0 50 -1 16 12 0.0000 4 120 705 6968 4673 END\001 +4 1 0 50 -1 16 12 0.0000 4 135 390 6968 4673 END\001 -6 1 3 0 1 0 0 50 -1 20 0.000 1 0.0000 3510 675 101 101 3510 675 3600 720 3 2 0 1 0 0 50 -1 20 0.000 0 1 0 2 diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/images/uml-fsm.eps --- a/documentation/images/uml-fsm.eps Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/images/uml-fsm.eps Fri Feb 22 11:33:49 2008 +0000 @@ -1,9 +1,9 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: uml-fsm.fig %%Creator: fig2dev Version 3.2 Patchlevel 4 -%%CreationDate: Mon Aug 7 19:25:18 2006 -%%For: fp@jupiter (Florian Pose) -%%BoundingBox: 0 0 500 461 +%%CreationDate: Fri Feb 22 12:25:41 2008 +%%For: fp@fetlas (Florian Pose) +%%BoundingBox: 0 0 498 461 %%Magnification: 1.0000 %%EndComments /$F2psDict 200 dict def @@ -46,7 +46,7 @@ end save -newpath 0 461 moveto 0 0 lineto 600 0 lineto 600 461 lineto closepath clip newpath +newpath 0 461 moveto 0 0 lineto 498 0 lineto 498 461 lineto closepath clip newpath -27.6 488.3 translate 1 -1 scale @@ -282,7 +282,7 @@ gs 1 -1 sc (- ec_fsm_slaveconf_sdoconf\(\)) col0 sh gr /Helvetica-iso ff 180.00 scf sf 4725 4005 m -gs 1 -1 sc (- ec_fsm_slaveconf_saveop\(\)) col0 sh gr +gs 1 -1 sc (- ec_fsm_slaveconf_safeop\(\)) col0 sh gr /Helvetica-iso ff 180.00 scf sf 4725 4185 m gs 1 -1 sc (- ec_fsm_slaveconf_op\(\)) col0 sh gr diff -r 80c3d9c8292f -r bfc3f1ab52de documentation/images/uml-fsm.fig --- a/documentation/images/uml-fsm.fig Fri Feb 22 11:04:49 2008 +0000 +++ b/documentation/images/uml-fsm.fig Fri Feb 22 11:33:49 2008 +0000 @@ -16,78 +16,78 @@ 4635 450 4635 7740 8325 7740 8325 450 2 1 0 1 0 7 110 -1 20 0.000 0 0 -1 0 0 4 450 7695 450 450 4140 450 4140 7740 -4 0 0 100 0 16 12 0.0000 4 150 1275 540 675 ec_fsm_t\001 -4 0 0 100 0 16 12 0.0000 4 150 3045 540 990 master: ec_master_t *\001 -4 0 0 100 -1 16 12 0.0000 4 150 2655 540 1170 slave: ec_slave_t *\001 -4 0 0 100 -1 16 12 0.0000 4 165 3600 540 1350 datagram: ec_datagram_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 4650 540 1530 master_state: void (*)(ec_fsm_t *)\001 -4 0 0 100 -1 16 12 0.0000 4 165 5730 540 1710 master_slaves_responding: unsigned int\001 -4 0 0 100 -1 16 12 0.0000 4 150 5475 540 1890 master_slave_states: ec_slave_state_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 4380 540 2070 master_validation: unsigned int\001 -4 0 0 100 -1 16 12 0.0000 4 165 4455 540 2250 slave_state: void (*)(ec_fsm_t *)\001 -4 0 0 100 -1 16 12 0.0000 4 165 4005 540 2430 sii_state: void (*)(ec_fsm_t *)\001 -4 0 0 100 -1 16 12 0.0000 4 150 2520 540 2610 sii_offset: uint16_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 3165 540 2790 sii_mode: unsigned int\001 -4 0 0 100 -1 16 12 0.0000 4 165 2700 540 2970 sii_value: uint8_t[4]\001 -4 0 0 100 -1 16 12 0.0000 4 165 2415 540 3150 sii_start: cycles_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 4755 540 3330 change_state: void (*)(ec_fsm_t *)\001 -4 0 0 100 -1 16 12 0.0000 4 165 4470 540 3510 change_new: ec_sllave_state_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 3165 540 3690 change_start: cycles_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 4215 540 3870 coe_state: void (*)(ec_fsm_t *)\001 -4 0 0 100 -1 16 12 0.0000 4 150 3585 540 4050 sdodata: ec_sdo_data_t *\001 -4 0 0 100 -1 16 12 0.0000 4 165 2625 540 4230 coe_start: cycles_t\001 -4 0 0 100 -1 16 12 0.0000 4 165 2550 540 4590 + ec_fsm_init(): int\001 -4 0 0 100 -1 16 12 0.0000 4 165 2370 540 4770 + ec_fsm_clear()\001 -4 0 0 100 -1 16 12 0.0000 4 165 2370 540 4950 + ec_fsm_reset()\001 -4 0 0 100 -1 16 12 0.0000 4 165 2790 540 5130 + ec_fsm_execute()\001 -4 0 0 100 -1 16 12 0.0000 4 165 2625 540 5310 + ec_fsm_startup()\001 -4 0 0 100 -1 16 12 0.0000 4 165 4365 540 5490 + ec_fsm_startup_running(): int\001 -4 0 0 100 -1 16 12 0.0000 4 165 4470 540 5670 + ec_fsm_startup_success(): int\001 -4 0 0 100 -1 16 12 0.0000 4 165 3495 540 5850 + ec_fsm_configuration()\001 -4 0 0 100 -1 16 12 0.0000 4 165 5235 540 6030 + ec_fsm_configuration_running(): int\001 -4 0 0 50 -1 16 12 0.0000 4 165 4200 4725 1665 - ec_fsm_configuration_conf()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3825 4725 1845 - ec_fsm_slavescan_start()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4380 4725 2025 - ec_fsm_slavescan_address()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3900 4725 2205 - ec_fsm_slavescan_state()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3930 4725 2385 - ec_fsm_slavescan_base()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4335 4725 2565 - ec_fsm_slavescan_datalink()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5070 4725 2745 - ec_fsm_slavescan_eeprom_size()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5100 4725 2925 - ec_fsm_slavescan_eeprom_data()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3540 4725 3105 - ec_fsm_slaveconf_init()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3810 4725 3285 - ec_fsm_slaveconf_sync()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3960 4725 3465 - ec_fsm_slaveconf_preop()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3900 4725 3645 - ec_fsm_slaveconf_fmmu()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4260 4725 3825 - ec_fsm_slaveconf_sdoconf()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4185 4725 4005 - ec_fsm_slaveconf_saveop()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3495 4725 4185 - ec_fsm_slaveconf_op()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3945 4725 4365 - ec_fsm_sii_start_reading()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3765 4725 4545 - ec_fsm_sii_read_check()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3585 4725 4725 - ec_fsm_sii_read_fetch()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3795 4725 4905 - ec_fsm_sii_start_writing()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3795 4725 5085 - ec_fsm_sii_write_check()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3975 4725 5265 - ec_fsm_sii_write_check2()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3435 4725 5445 - ec_fsm_change_start()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3690 4725 5625 - ec_fsm_change_check()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3675 4725 5805 - ec_fsm_change_status()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3540 4725 5985 - ec_fsm_change_code()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3345 4725 6165 - ec_fsm_change_ack()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4380 4725 6345 - ec_fsm_change_check_ack()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3855 4725 6525 - ec_fsm_coe_down_start()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4320 4725 6705 - ec_fsm_coe_down_request()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4110 4725 6885 - ec_fsm_coe_down_check()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4590 4725 7065 - ec_fsm_coe_down_response()\001 -4 0 0 50 -1 16 12 0.0000 4 165 2130 4725 7245 - ec_fsm_end()\001 -4 0 0 50 -1 16 12 0.0000 4 165 2265 4725 7425 - ec_fsm_error()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4665 4725 765 - ec_fsm_master_write_eeprom()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3330 4725 945 - ec_fsm_startup_start()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4140 4725 1125 - ec_fsm_startup_broadcast()\001 -4 0 0 50 -1 16 12 0.0000 4 165 3420 4725 1305 - ec_fsm_startup_scan()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4200 4725 1485 - ec_fsm_configuration_start()\001 -4 0 0 100 -1 16 12 0.0000 4 165 5340 540 6210 + ec_fsm_configuration_success(): int\001 -4 0 0 50 -1 16 12 0.0000 4 165 3330 540 6390 - ec_fsm_master_start()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4140 540 6570 - ec_fsm_master_broadcast()\001 -4 0 0 50 -1 16 12 0.0000 4 165 4395 540 6750 - ec_fsm_master_read_states()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5010 540 6930 - ec_fsm_master_validate_vendor()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5085 540 7110 - ec_fsm_master_validate_product()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5370 540 7290 - ec_fsm_master_rewrite_addresses()\001 -4 0 0 50 -1 16 12 0.0000 4 165 5160 540 7470 - ec_fsm_master_configure_slaves()\001 +4 0 0 100 0 16 12 0.0000 4 165 735 540 675 ec_fsm_t\001 +4 0 0 100 0 16 12 0.0000 4 165 1785 540 990 master: ec_master_t *\001 +4 0 0 100 -1 16 12 0.0000 4 165 1605 540 1170 slave: ec_slave_t *\001 +4 0 0 100 -1 16 12 0.0000 4 180 2100 540 1350 datagram: ec_datagram_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 2745 540 1530 master_state: void (*)(ec_fsm_t *)\001 +4 0 0 100 -1 16 12 0.0000 4 180 3345 540 1710 master_slaves_responding: unsigned int\001 +4 0 0 100 -1 16 12 0.0000 4 165 3195 540 1890 master_slave_states: ec_slave_state_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 2580 540 2070 master_validation: unsigned int\001 +4 0 0 100 -1 16 12 0.0000 4 180 2655 540 2250 slave_state: void (*)(ec_fsm_t *)\001 +4 0 0 100 -1 16 12 0.0000 4 180 2385 540 2430 sii_state: void (*)(ec_fsm_t *)\001 +4 0 0 100 -1 16 12 0.0000 4 165 1485 540 2610 sii_offset: uint16_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 1860 540 2790 sii_mode: unsigned int\001 +4 0 0 100 -1 16 12 0.0000 4 180 1605 540 2970 sii_value: uint8_t[4]\001 +4 0 0 100 -1 16 12 0.0000 4 180 1440 540 3150 sii_start: cycles_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 2835 540 3330 change_state: void (*)(ec_fsm_t *)\001 +4 0 0 100 -1 16 12 0.0000 4 180 2640 540 3510 change_new: ec_sllave_state_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 1890 540 3690 change_start: cycles_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 2520 540 3870 coe_state: void (*)(ec_fsm_t *)\001 +4 0 0 100 -1 16 12 0.0000 4 165 2130 540 4050 sdodata: ec_sdo_data_t *\001 +4 0 0 100 -1 16 12 0.0000 4 180 1575 540 4230 coe_start: cycles_t\001 +4 0 0 100 -1 16 12 0.0000 4 180 1515 540 4590 + ec_fsm_init(): int\001 +4 0 0 100 -1 16 12 0.0000 4 180 1395 540 4770 + ec_fsm_clear()\001 +4 0 0 100 -1 16 12 0.0000 4 180 1380 540 4950 + ec_fsm_reset()\001 +4 0 0 100 -1 16 12 0.0000 4 180 1635 540 5130 + ec_fsm_execute()\001 +4 0 0 100 -1 16 12 0.0000 4 180 1530 540 5310 + ec_fsm_startup()\001 +4 0 0 100 -1 16 12 0.0000 4 180 2565 540 5490 + ec_fsm_startup_running(): int\001 +4 0 0 100 -1 16 12 0.0000 4 180 2625 540 5670 + ec_fsm_startup_success(): int\001 +4 0 0 100 -1 16 12 0.0000 4 180 2055 540 5850 + ec_fsm_configuration()\001 +4 0 0 100 -1 16 12 0.0000 4 180 3090 540 6030 + ec_fsm_configuration_running(): int\001 +4 0 0 50 -1 16 12 0.0000 4 180 2490 4725 1665 - ec_fsm_configuration_conf()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2250 4725 1845 - ec_fsm_slavescan_start()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2565 4725 2025 - ec_fsm_slavescan_address()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2295 4725 2205 - ec_fsm_slavescan_state()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2310 4725 2385 - ec_fsm_slavescan_base()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2550 4725 2565 - ec_fsm_slavescan_datalink()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2955 4725 2745 - ec_fsm_slavescan_eeprom_size()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2985 4725 2925 - ec_fsm_slavescan_eeprom_data()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2100 4725 3105 - ec_fsm_slaveconf_init()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2265 4725 3285 - ec_fsm_slaveconf_sync()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2340 4725 3465 - ec_fsm_slaveconf_preop()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2280 4725 3645 - ec_fsm_slaveconf_fmmu()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2520 4725 3825 - ec_fsm_slaveconf_sdoconf()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2415 4725 4005 - ec_fsm_slaveconf_safeop()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2070 4725 4185 - ec_fsm_slaveconf_op()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2310 4725 4365 - ec_fsm_sii_start_reading()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2220 4725 4545 - ec_fsm_sii_read_check()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2115 4725 4725 - ec_fsm_sii_read_fetch()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2220 4725 4905 - ec_fsm_sii_start_writing()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2235 4725 5085 - ec_fsm_sii_write_check()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2340 4725 5265 - ec_fsm_sii_write_check2()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2025 4725 5445 - ec_fsm_change_start()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2190 4725 5625 - ec_fsm_change_check()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2160 4725 5805 - ec_fsm_change_status()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2100 4725 5985 - ec_fsm_change_code()\001 +4 0 0 50 -1 16 12 0.0000 4 180 1980 4725 6165 - ec_fsm_change_ack()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2595 4725 6345 - ec_fsm_change_check_ack()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2265 4725 6525 - ec_fsm_coe_down_start()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2535 4725 6705 - ec_fsm_coe_down_request()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2430 4725 6885 - ec_fsm_coe_down_check()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2685 4725 7065 - ec_fsm_coe_down_response()\001 +4 0 0 50 -1 16 12 0.0000 4 180 1260 4725 7245 - ec_fsm_end()\001 +4 0 0 50 -1 16 12 0.0000 4 180 1335 4725 7425 - ec_fsm_error()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2700 4725 765 - ec_fsm_master_write_eeprom()\001 +4 0 0 50 -1 16 12 0.0000 4 180 1950 4725 945 - ec_fsm_startup_start()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2430 4725 1125 - ec_fsm_startup_broadcast()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2010 4725 1305 - ec_fsm_startup_scan()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2475 4725 1485 - ec_fsm_configuration_start()\001 +4 0 0 100 -1 16 12 0.0000 4 180 3150 540 6210 + ec_fsm_configuration_success(): int\001 +4 0 0 50 -1 16 12 0.0000 4 180 1935 540 6390 - ec_fsm_master_start()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2415 540 6570 - ec_fsm_master_broadcast()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2550 540 6750 - ec_fsm_master_read_states()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2940 540 6930 - ec_fsm_master_validate_vendor()\001 +4 0 0 50 -1 16 12 0.0000 4 180 2985 540 7110 - ec_fsm_master_validate_product()\001 +4 0 0 50 -1 16 12 0.0000 4 180 3105 540 7290 - ec_fsm_master_rewrite_addresses()\001 +4 0 0 50 -1 16 12 0.0000 4 180 3015 540 7470 - ec_fsm_master_configure_slaves()\001 diff -r 80c3d9c8292f -r bfc3f1ab52de master/fsm_change.c --- a/master/fsm_change.c Fri Feb 22 11:04:49 2008 +0000 +++ b/master/fsm_change.c Fri Feb 22 11:33:49 2008 +0000 @@ -348,7 +348,7 @@ {0x0020, "Slave needs cold start"}, {0x0021, "Slave needs INIT"}, {0x0022, "Slave needs PREOP"}, - {0x0023, "Slave needs SAVEOP"}, + {0x0023, "Slave needs SAFEOP"}, {0x0030, "Invalid DC SYNCH configuration"}, {0x0031, "Invalid DC latch configuration"}, {0x0032, "PLL error"}, diff -r 80c3d9c8292f -r bfc3f1ab52de master/fsm_slave.c --- a/master/fsm_slave.c Fri Feb 22 11:04:49 2008 +0000 +++ b/master/fsm_slave.c Fri Feb 22 11:33:49 2008 +0000 @@ -64,7 +64,7 @@ void ec_fsm_slave_conf_state_pdo_conf(ec_fsm_slave_t *); void ec_fsm_slave_conf_state_pdo_sync(ec_fsm_slave_t *); void ec_fsm_slave_conf_state_fmmu(ec_fsm_slave_t *); -void ec_fsm_slave_conf_state_saveop(ec_fsm_slave_t *); +void ec_fsm_slave_conf_state_safeop(ec_fsm_slave_t *); void ec_fsm_slave_conf_state_op(ec_fsm_slave_t *); void ec_fsm_slave_conf_enter_mbox_sync(ec_fsm_slave_t *); @@ -73,7 +73,7 @@ void ec_fsm_slave_conf_enter_mapping(ec_fsm_slave_t *); void ec_fsm_slave_conf_enter_pdo_sync(ec_fsm_slave_t *); void ec_fsm_slave_conf_enter_fmmu(ec_fsm_slave_t *); -void ec_fsm_slave_conf_enter_saveop(ec_fsm_slave_t *); +void ec_fsm_slave_conf_enter_safeop(ec_fsm_slave_t *); void ec_fsm_slave_state_end(ec_fsm_slave_t *); void ec_fsm_slave_state_error(ec_fsm_slave_t *); @@ -878,7 +878,7 @@ if (!slave->config) { EC_DBG("Slave %u is not configured.\n", slave->ring_position); - ec_fsm_slave_conf_enter_saveop(fsm); + ec_fsm_slave_conf_enter_safeop(fsm); return; } @@ -1089,7 +1089,7 @@ const ec_sync_t *sync; if (!slave->base_fmmu_count) { // skip FMMU configuration - ec_fsm_slave_conf_enter_saveop(fsm); + ec_fsm_slave_conf_enter_safeop(fsm); return; } @@ -1144,29 +1144,29 @@ return; } - ec_fsm_slave_conf_enter_saveop(fsm); -} - -/*****************************************************************************/ - -/** - * Request SAVEOP state. + ec_fsm_slave_conf_enter_safeop(fsm); +} + +/*****************************************************************************/ + +/** + * Request SAFEOP state. */ -void ec_fsm_slave_conf_enter_saveop(ec_fsm_slave_t *fsm /**< slave state machine */) -{ - fsm->state = ec_fsm_slave_conf_state_saveop; - ec_fsm_change_start(&fsm->fsm_change, fsm->slave, EC_SLAVE_STATE_SAVEOP); +void ec_fsm_slave_conf_enter_safeop(ec_fsm_slave_t *fsm /**< slave state machine */) +{ + fsm->state = ec_fsm_slave_conf_state_safeop; + ec_fsm_change_start(&fsm->fsm_change, fsm->slave, EC_SLAVE_STATE_SAFEOP); ec_fsm_change_exec(&fsm->fsm_change); // execute immediately } /*****************************************************************************/ /** - Slave configuration state: SAVEOP. -*/ - -void ec_fsm_slave_conf_state_saveop(ec_fsm_slave_t *fsm /**< slave state machine */) + Slave configuration state: SAFEOP. +*/ + +void ec_fsm_slave_conf_state_safeop(ec_fsm_slave_t *fsm /**< slave state machine */) { ec_master_t *master = fsm->slave->master; ec_slave_t *slave = fsm->slave; @@ -1180,10 +1180,10 @@ return; } - // slave is now in SAVEOP + // slave is now in SAFEOP if (master->debug_level) { - EC_DBG("Slave %i is now in SAVEOP.\n", slave->ring_position); + EC_DBG("Slave %i is now in SAFEOP.\n", slave->ring_position); } if (fsm->slave->current_state == fsm->slave->requested_state) { diff -r 80c3d9c8292f -r bfc3f1ab52de master/module.c --- a/master/module.c Fri Feb 22 11:04:49 2008 +0000 +++ b/master/module.c Fri Feb 22 11:33:49 2008 +0000 @@ -383,9 +383,9 @@ off += sprintf(buffer + off, "PREOP"); first = 0; } - if (states & EC_SLAVE_STATE_SAVEOP) { + if (states & EC_SLAVE_STATE_SAFEOP) { if (!first) off += sprintf(buffer + off, ", "); - off += sprintf(buffer + off, "SAVEOP"); + off += sprintf(buffer + off, "SAFEOP"); first = 0; } if (states & EC_SLAVE_STATE_OP) { diff -r 80c3d9c8292f -r bfc3f1ab52de master/slave.c --- a/master/slave.c Fri Feb 22 11:04:49 2008 +0000 +++ b/master/slave.c Fri Feb 22 11:33:49 2008 +0000 @@ -1035,8 +1035,8 @@ return sprintf(buffer, "INIT\n"); case EC_SLAVE_STATE_PREOP: return sprintf(buffer, "PREOP\n"); - case EC_SLAVE_STATE_SAVEOP: - return sprintf(buffer, "SAVEOP\n"); + case EC_SLAVE_STATE_SAFEOP: + return sprintf(buffer, "SAFEOP\n"); case EC_SLAVE_STATE_OP: return sprintf(buffer, "OP\n"); default: @@ -1084,8 +1084,8 @@ ec_slave_request_state(slave, EC_SLAVE_STATE_INIT); else if (!strcmp(buffer, "PREOP\n")) ec_slave_request_state(slave, EC_SLAVE_STATE_PREOP); - else if (!strcmp(buffer, "SAVEOP\n")) - ec_slave_request_state(slave, EC_SLAVE_STATE_SAVEOP); + else if (!strcmp(buffer, "SAFEOP\n")) + ec_slave_request_state(slave, EC_SLAVE_STATE_SAFEOP); else if (!strcmp(buffer, "OP\n")) ec_slave_request_state(slave, EC_SLAVE_STATE_OP); else { diff -r 80c3d9c8292f -r bfc3f1ab52de master/slave.h --- a/master/slave.h Fri Feb 22 11:04:49 2008 +0000 +++ b/master/slave.h Fri Feb 22 11:33:49 2008 +0000 @@ -62,8 +62,8 @@ /**< INIT state (no mailbox communication, no IO) */ EC_SLAVE_STATE_PREOP = 0x02, /**< PREOP state (mailbox communication, no IO) */ - EC_SLAVE_STATE_SAVEOP = 0x04, - /**< SAVEOP (mailbox communication and input update) */ + EC_SLAVE_STATE_SAFEOP = 0x04, + /**< SAFEOP (mailbox communication and input update) */ EC_SLAVE_STATE_OP = 0x08, /**< OP (mailbox communication and input/output update) */ EC_SLAVE_STATE_ACK_ERR = 0x10