# HG changeset patch # User Ideenmodellierer # Date 1551631610 -3600 # Node ID 4fd8bbc7d84149571c1545b537d2d2f21b813b61 # Parent 1ac5033f7c7a9a0da7e05da9b45c2975fe6800ef Do hard sync after communication timeout > 1 second diff -r 1ac5033f7c7a -r 4fd8bbc7d841 Small_CPU/Src/scheduler.c --- a/Small_CPU/Src/scheduler.c Sun Mar 03 17:45:39 2019 +0100 +++ b/Small_CPU/Src/scheduler.c Sun Mar 03 17:46:50 2019 +0100 @@ -432,7 +432,7 @@ void schedule_check_resync(void) { - //TODO: REMOVE + /* counter is incremented in cyclic 100ms loop and reset to 0 if the transmission complete callback is called */ if((global.check_sync_not_running >= 3)) { // global.dataSendToSlaveIsNotValidCount = 0; @@ -444,6 +444,10 @@ */ SPI_Start_single_TxRx_with_Master(); } + if((global.check_sync_not_running == 10)) /* connection lost for about a second. Could be debugging or Firmware update */ + { + dohardspisync = 1; + } }