Skip to content

Commit

Permalink
Merge pull request OpenEtherCATsociety#66 from Apollo3zehn/fix_fatal_…
Browse files Browse the repository at this point in the history
…sync_error

fix issue OpenEtherCATsociety#60 (slave fails going to OP: fatal sync error)
  • Loading branch information
nakarlsson authored Dec 21, 2016
2 parents 1b0635c + d7a3b60 commit ea93151
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion soem/ethercatconfig.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Simple Open EtherCAT Master Library
*
* File : ethercatconfig.c
Expand Down Expand Up @@ -202,6 +202,8 @@ static void ecx_set_slaves_to_default(ecx_contextt *context)
ecx_BWR(context->port, 0x0000, ECT_REG_RXERR , 8 , &zbuf, EC_TIMEOUTRET3); /* reset CRC counters */
ecx_BWR(context->port, 0x0000, ECT_REG_FMMU0 , 16 * 3 , &zbuf, EC_TIMEOUTRET3); /* reset FMMU's */
ecx_BWR(context->port, 0x0000, ECT_REG_SM0 , 8 * 4 , &zbuf, EC_TIMEOUTRET3); /* reset SyncM */
b = 0x00;
ecx_BWR(context->port, 0x0000, ECT_REG_DCSYNCACT , sizeof(b) , &b, EC_TIMEOUTRET3); /* reset activation register */
ecx_BWR(context->port, 0x0000, ECT_REG_DCSYSTIME , 4 , &zbuf, EC_TIMEOUTRET3); /* reset system time+ofs */
w = htoes(0x1000);
ecx_BWR(context->port, 0x0000, ECT_REG_DCSPEEDCNT , sizeof(w) , &w, EC_TIMEOUTRET3); /* DC speedstart */
Expand Down

0 comments on commit ea93151

Please sign in to comment.