diff Small_CPU/Inc/scheduler.h @ 265:a91d99265884 IPC_Sync_Improvment_2

Increase SPI com timeout for cold start and wake up There are use cases which cause the startup at Main to be longer than 300ms. In that case error reaction on RTE side would take place even if not needed. On the other hand having an longer timeout delays timeout detection and therefor the time till connection is reestablished => Added function to separate startup from common operation use case
author ideenmodellierer
date Sun, 14 Apr 2019 14:22:41 +0200
parents b3685fbada3b
children aa6006975e76
line wrap: on
line diff
--- a/Small_CPU/Inc/scheduler.h	Sun Apr 14 11:43:29 2019 +0200
+++ b/Small_CPU/Inc/scheduler.h	Sun Apr 14 14:22:41 2019 +0200
@@ -40,6 +40,9 @@
 #define SCHEDULER_TICK_EXE1SEC	(980u) 	/* tick count based on cycle start which is used to trigger functions which */
 										/* shall be executed once in a second (20ms before cycle restarts) */
 
+#define SPI_COM_TIMEOUT_START		(5)		/* *100 ms timeout to avoid tiemout e.g. after Main wakeup */
+#define SPI_COM_TIMEOUT_COMMON		(3)		/* *100ms shorter timeout during normal operation to have a faster error reaction */
+
 typedef struct
 {
 	uint8_t mode;
@@ -84,6 +87,7 @@
 	uint8_t counterPressure100msec;
 	uint8_t counterCompass100msec;
 	uint8_t counterAmbientLight100msec;
+	uint8_t	communicationTimeout;
 	uint32_t tick_execute1second;
 	uint32_t tickstart;
 } SScheduleCtrl;