Merge pull request #66 from Apollo3zehn/fix_fatal_sync_error

fix issue #60 (slave fails going to OP: fatal sync error)
pull/70/head
nakarlsson 2016-12-21 11:15:07 +01:00 committed by GitHub
commit ea931518a1
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* Simple Open EtherCAT Master Library
*
* File : ethercatconfig.c
@ -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 */