Mercurial > public > ostc4
comparison Small_CPU/Src/scheduler.c @ 82:a6f0881074a4 kittz
+i2c analog noise filtering
spi more stable
author | Dmitry Romanov <kitt@bk.ru> |
---|---|
date | Tue, 20 Nov 2018 12:08:19 +0300 |
parents | 5f11787b4f42 |
children | e6abbef57475 |
comparison
equal
deleted
inserted
replaced
80:cc2bb7bb8456 | 82:a6f0881074a4 |
---|---|
404 * @date 18-June-2015 | 404 * @date 18-June-2015 |
405 ****************************************************************************** | 405 ****************************************************************************** |
406 */ | 406 */ |
407 void schedule_check_resync(void) | 407 void schedule_check_resync(void) |
408 { | 408 { |
409 if((global.check_sync_not_running >= 10) || (global.dataSendToSlaveIsNotValidCount >= 2)) | 409 //TODO: (kittz) test for stability |
410 if((global.check_sync_not_running >= 10)) | |
410 { | 411 { |
411 global.dataSendToSlaveIsNotValidCount = 0; | 412 global.dataSendToSlaveIsNotValidCount = 0; |
412 global.check_sync_not_running = 0; | 413 global.check_sync_not_running = 0; |
413 global.sync_error_count++; | 414 global.sync_error_count++; |
414 MX_SPI_DeInit(); | 415 MX_SPI_DeInit(); |